Jump to content
Developer Wiki and Function Reference Links ×

Script to Select doors or windows of a matching style


The Hamma

Recommended Posts

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.

Link to comment

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);

 

Link to comment
  • 4 months later...

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...