benis Posted October 22, 2002 Share Posted October 22, 2002 Could anyone tell me if they have a script or could write a script that would do the following: I select an instance of a symbol in a drawing then run a script that will select all other instances of that selected symbol. I want to use this in order to edit the records of all the instances of a particular symbol in the drawing simultaneously without having to constantly keep going through the custom selection routine or going throught the drawing and individually selecting instances of the particular symbol. I want to be able to select a single instance of a symbol then in one step select all of the remaining instances. It would also be nice if the script could work for plug-in objects, or another script could be written for plug-in objects. I would greatly appreciate the help. I am using VWA 9.5.3 on a Mac (OS 10.2) Ben Quote Link to comment
Guest Posted October 23, 2002 Share Posted October 23, 2002 procedure selectLikeSyms; var theSym : HANDLE; symName : STRING; selCriteria : STRING; begin theSym := FSActLayer; if (GetType(theSym) = 15) then begin symName := GetSymName(theSym); selCriteria := CONCAT('S=', symName); message(selCriteria); SelectObj(selCriteria); end; end; run(selectLikeSyms); Quote Link to comment
Guest Posted October 23, 2002 Share Posted October 23, 2002 If the symbol name is multiple words with a space character, then the script I posted will need to be tweaked to put quote marks around the symbol name. Replace: selCriteria := CONCAT('S=', symName); with: selCriteria := CONCAT('S=''', symName, ''''); Two adjacent quotes will act like an escape and put one quote character in the string. Therefore you need three single quotes after the S= and you need four single quotes before the close paren. Quote Link to comment
benis Posted October 23, 2002 Author Share Posted October 23, 2002 That worked beautifully! Ben 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.