Vectorworks, Inc Employee Matt Panzer Posted December 1, 2012 Vectorworks, Inc Employee Share Posted December 1, 2012 Is there a way to get a list of all symbol definitions (including any nested in symbol folders) that are only in the current VW document? Quote Link to comment
Hippocode Posted December 3, 2012 Share Posted December 3, 2012 criteria:='(INSYMBOL & INOBJECT & INVIEWPORT & (T=SYMBOL))'; ForEachObject(MakeTheList, criteria); This should loop trough all the symbols, within the function MakeTheList you can get the symbolfoldername with the info on this post: http://www.vectorlab.info/index.php?title=Han-Get_Symbol_Folder Quote Link to comment
Vectorworks, Inc Employee Matt Panzer Posted December 3, 2012 Author Vectorworks, Inc Employee Share Posted December 3, 2012 Thanks hippothamus, Sam Jones and Raymond Mullin lent me a hand on the Vectorscript Mail List. I was using ForEachObjectInList but had it set not to look in groups. Apparently, Symbol Folders are considered groups in this case. All is well now. Quote Link to comment
J. Miller Posted February 17, 2014 Share Posted February 17, 2014 Hey Matt, I'm working on the same situation right now. What did you come up with. I also need to add rather a certain record is also attached to that symbol definition TIA Jeff Miller Quote Link to comment
Vectorworks, Inc Employee Matt Panzer Posted February 18, 2014 Author Vectorworks, Inc Employee Share Posted February 18, 2014 Hi Jeff, I cannot remember exactly what I was doing when I asked this, but I think I wound up using a resource list. Something like this to get the list. PROCEDURE MAIN VAR symDefList : LONGINT; symDefNum : LONGINT; BEGIN symDefList := BuildResourceList( 16, 0, '', symDefNum ); END; Quote Link to comment
Vectorworks, Inc Employee klinzey Posted February 18, 2014 Vectorworks, Inc Employee Share Posted February 18, 2014 ForEachObject() will only search objects placed in the document, it will not search the symbol list. You can use ForEachObjectInList() and pass in fSymDef to get the the head of the symbol list. You do the record checking in the callback function. (FYI: Make sure to do type checking because you will encounter handles to symbol folders too.) BuildResourceList() is great but you will need to traverse the list again to look for the attached record. There is a remove call to remove items from the list. Which calls are better all depends on what else you have to do to the list of symbols. Quote Link to comment
J. Miller Posted February 19, 2014 Share Posted February 19, 2014 I wound up using ForEachObjetcInList as Kevin mentioned. It seems to work fine... so far. Thanks, Jeff 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.