Hippocode Posted April 25, 2013 Share Posted April 25, 2013 (edited) While having a handle on a mastersymbol, I would like to search if there is a slavesymbol in the selected mastersymbol, obviously I also need a handle to the slavesymbol. Is this possible ? OR I could change the symbol insertion options to make it a group on placing in the drawing. But then I would need to be able to find symbols in a selected group. + I prefer the above in case I ever want to change the symbol in an excisting drawing. Edited April 25, 2013 by hippothamus Quote Link to comment
maarten. Posted April 25, 2013 Share Posted April 25, 2013 If you have the handle to the symbol definition, this below should work. ObjH:=FInSymDef(SymDefH); WHILE ObjH<>NIL DO BEGIN IF GetTypeN(ObjH)=15 THEN BEGIN {this is a symbol inside your master symbol} END; END; Quote Link to comment
Hippocode Posted April 25, 2013 Author Share Posted April 25, 2013 (edited) I won't have a handle to the definition. Its about symbols selected in the drawing. I have a loop that gives them some sort of numbering, when I have symbols in symbols it needs to number the slavesymbols instead of the master ones. Now I think about it my first suggestion won't work, cuz I can't change the Mastersymbol. So they have to become a group first. looking into that Edited April 25, 2013 by hippothamus Quote Link to comment
maarten. Posted April 25, 2013 Share Posted April 25, 2013 You can get the handle to the definition with symDefH:=GetObject(GetSymName(symH)); Quote Link to comment
Hippocode Posted April 25, 2013 Author Share Posted April 25, 2013 well I made my question a mess: I'm not looking into changing the slavesymbols, so I don't need a handle to the definition. I have multiple selected objects being (symbols and groups). My symbols get a number in my drawing, with SetRField. The selected groups have multiple symbols inside, which also should be numbered. So i'm looking into a handle for each symbol, in a group on my drawing. Quote Link to comment
Pat Stanford Posted April 25, 2013 Share Posted April 25, 2013 What about adding a record to the symbols that should be numbered and using Link Text to Record. That way each symbol instance can be numbered separately even if they are contained in a master symbol. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.