Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extract Sequence order of NX object in Journal (vb.net)

Status
Not open for further replies.

lklo

Industrial
Nov 24, 2010
226
Hi guys....

In my current sourcecode develeopment project, I'm trying to manipulate with some Custom Symbols ,before populating a Summary List on the active drawing sheet...

My question is quite basic....

Say I place a predefined Custom symbol on a drawing sheet , and then I place (or Copy/Paste) yet another of the same instance afterwards...
Are you aware about, if some "flags" can be extracted from the Symbols, So I programticaly can figure out which Object was created first,sec, etc...

I have tried extract the object Tags - but it Seems like not always the Latest Created object, have the higest Tag integer....

(If this was gonna happen, I could easily do some sorting, based on the Tags)...

regards Lklo....
 
Replies continue below

Recommended for you

To the best of my knowledge, the creation order for objects such as symbols is not explicitly saved within the file. In my experience, the order that objects are returned from their respective collections generally matches the creation order (older objects returned first, new objects returned last). However, I don't think this is a guarantee, so if the order is critical to your application, I would not rely on this method.

www.nxjournaling.com
 
Thanks Cowski....

Yeah - It will no be good practice to rely on this method....
I thought that the assign Tag always would be greater for each intance created - but this not always True.....

BUT...

The Custom Symbols that I am dealing with, is also created from the Custom Tool, that I use to create the Summary List (TabNote)..
Now I have added a small utility, that for each Symbol created, the program will assign an object attribute with an integer value ...
Program collect amounts of allready created Symbols, and then this value incremented +1 , will be value of next symbol...

Then when I have a flag on each symbol, that can be used as argument, in my sorting function....

I have tested last two days - and it seems like working as dream....

br lklo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor