Cancel
Showing results for 
Search instead for 
Did you mean: 

What is the differance between cycling and parsing through objects?

Creator
Creator
3 REPLIES

Re: What is the differance between cycling and parsing through objects?

Solution Partner Experimenter Solution Partner Experimenter
Solution Partner Experimenter

Hi Logan,

 

Can you provide more context? 

edavis, NX Application Engineer, Applied CAx, LLC
Production: NX12
Development: C#, tcl

Re: What is the differance between cycling and parsing through objects?

Siemens Phenom Siemens Phenom
Siemens Phenom

This answer is vague, but it's the best I can do, given that the question was pretty vague, too.

 

Cycling: In an NX context, this means iterating through the objects in some collection, visiting each one in sequence. For example, you might cycle through all the solid bodies in a part file, or you might cycle through all the lines on layer 50. The cycling code often uses a "For Each" loop or something similar.

 

Parsing: This generally refers to an algorithm that reads some data and tries to decompose it into basic elements that have some known meanings. For example, a compiler has to "parse" the text of a program to identify its various elements and their meaning. I'm not aware of any situation where your code would need to "parse" an NX object. If you have an NX arc object, for example, you don't have to parse its data to find its radius; you use a property or an NX/Open function, instead.

 

You could try to write a program that parses the info in an NX part file. But, in my opinion, this would be a bad idea. The file format is not documented, and it changes quite often. The NX/Open API isolates you from these changes and removes the need for this low-level parsing. 

 

 

山田
yamada

Re: What is the differance between cycling and parsing through objects?

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

For me cycling is used when iterating through a collection, array, list, etc.

Parsing is used when you search for a specific information in a CSV, HTML or other formatted or non-formatted text-file.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.2, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 11.4
Development: C (ITK), .NET, Tcl/Tk Testing: NX12.0 | AWC 3.4 Preparing: NX12.0

Employees of the customers, together we are strong Smiley Wink
How to Get the Most from Your Signature in the Community
NX Customization - Best Practice Guide