The Hamma Posted November 16, 2022 Share Posted November 16, 2022 PROCEDURE SelectMatch; VAR h : HANDLE; layernameis, stylenameis : STRING; PROCEDURE GetStyleName(h :HANDLE); BEGIN stylenameis := GetPluginStyle(h); END; BEGIN layernameis := GetLName(ActLayer); ForEachObject (GetStyleName,(((L=layernameis) & (SEL=TRUE) & ((PON='Door') | (PON='Window'))))); if stylenameis <> '' THEN SelectObj((((V) & (PST=stylenameis)))); END; Run(SelectMatch); To use select one door or window and run script. Quote Link to comment
The Hamma Posted November 17, 2022 Author Share Posted November 17, 2022 I edited it to also select unstyled versions. I also added Spaces, Comm Devices, and Receptacles PROCEDURE SelectMatch; VAR h : HANDLE; piotypeis, layernameis, stylenameis : STRING; PROCEDURE GetStyleName(h :HANDLE); BEGIN stylenameis := GetPluginStyle(h); piotypeis := GetObjectVariableString(h, 1166); END; BEGIN layernameis := GetLName(ActLayer); ForEachObject (GetStyleName,(NOTINDLVP & NOTINREFDLVP & ((L=layernameis) & (SEL=TRUE) & ((PON='Door') | (PON='Window') | (PON='Space') | (PON='Comm Device') | (PON='Receptacle'))))); SelectObj((((PON=piotypeis) & (PST=stylenameis) & (L=layernameis)))); END; Run(SelectMatch); Quote Link to comment
MarcelP102 Posted November 17, 2022 Share Posted November 17, 2022 See my script here: https://marcelplomp.gumroad.com/l/fqmyr It does the same for almost all objects types. Quote Link to comment
Steve Murray Posted March 22, 2023 Share Posted March 22, 2023 I'm looking for a similar script that would prompt the user to select the desired plugin object style from a list (similar to the list you get when replacing the style) rather than having to select the style before running the script. 😀 1 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.