Jump to content
Developer Wiki and Function Reference Links ×

Getting a list of ALL symbols in the active document


Recommended Posts

  • Vectorworks, Inc Employee

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.

Link to comment
  • 1 year later...
  • Vectorworks, Inc Employee

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;

Link to comment
  • Vectorworks, Inc Employee

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.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...