Jump to content
Developer Wiki and Function Reference Links Read more... ×
Sign in to follow this  
Hippocode

Search for symbol in symbol

Recommended Posts

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 by hippothamus

Share this post


Link to post

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;

Share this post


Link to post

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 by hippothamus

Share this post


Link to post

You can get the handle to the definition with symDefH:=GetObject(GetSymName(symH));

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×