cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed for NX drawing migration

Solution Partner Valued Contributor Solution Partner Valued Contributor
Solution Partner Valued Contributor

Hello,

 

I am preparing to do a project of mass data migration. The customer is about to send us some drawing files for us to use while we build a program to automate the migration process. Now, I am trying to figure out a way to automate the process of opening the drawing file, exporting the strings/tabular note cell/ title block or whatever you might call it as well as any additional data. I can then use this information to mass import as datasets under their respective item types. Honestly, I dont even know if this is possibe. Any thoughts or words of encouragement on the subject would be much apprecieted. 

 

Thanks

3 REPLIES

Re: Help needed for NX drawing migration

Esteemed Contributor
Esteemed Contributor

It should be possible, the issue will be "how difficult will it be"

- If all the info you are looking for is in "titleblock" objects, it should not be too hard. (or if it has specific entity names or attributes)

- If the info is scattered all over the drawing, and on different places on each drawing, it will be much more difficult.

 

But you can read every piece of text on a drawing (including dimensions, note, labels, tabular notes, etc.) without too much trouble.  There are even calls to get the "displayed" text e.g. if expresions or attributes are referenced in  the text) - search for examples in the Solutions Database:

https://solutions.industrysoftware.automation.siemens.com/

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: Help needed for NX drawing migration

Solution Partner Experimenter Solution Partner Experimenter
Solution Partner Experimenter
Hi Ken,

I am looking into this too. Can you provide any feedback on how this is actually done? I have looked around the solution center and have not found anything really. Is there a command to do this or a dll or api i can use somewhere? I would really appreciate a little more detail.

Thank you very much,
Bob

Re: Help needed for NX drawing migration

Phenom
Phenom

To get the text as shown on the drawing, rather than a reference to an attribute or expression, use the .GetEvaluatedText method. An example can be found here:

 

http://solutions.industrysoftware.automation.siemens.com/view.php?si=nx_api4708

 

A while back I wrote some code to find the titles of our old drawings. The title blocks on these drawings were made with lines (as opposed to using tabular notes) and the title note was located somewhere within the area dedicated for it. Fortunately for me, the title block remained pretty consistent over the years. What I did was open an old drawing of each sheet size and noted the size/location of the drawing title entry area. Then in my code, I queried the sheet size and iterated through all the note objects; if the annotation origin was within the rectangular title area, I assumed that I had my title note. There were a few oddballs that I had to open and inspect manually, but by and large it worked pretty well.