Jump to content
Sign in to follow this  
Pat Stanford

Set Window Marker Default Offset

Recommended Posts

This script will set the default marker distance from the wall or change the distance on selected walls. If the windows are in walls, the windows must be selected individually, but can all be changed at once.

This should be able to be converted to a Plug-in Menu item rather easily.

(************* Copy Between Here *************}

Procedure SetWindowMarkerOffset;

{If nothing in the drawing is selected, this sets the default offset distance perpendicular}

{to the wall to the value entered in the dialog box. If objects are selected, it sets the }

{marker offset for any windows selected to the value entered in the dialog box.}

{? 2009, Coviana, Inc - Pat Stanford pat@coviana.com}

{Licensed unde the GNU Lesser General Public License}

var H1,H2:Handle;

N1:Integer;

S1:String;

R1:Real;

Procedure DoIt(H3:Handle);

Begin

N1:=NumRecords(H3);

H2:=GetRecord(H3,N1);

S1:=GetName(H2);

SetRField(H3,S1,'ControlPoint03Y',Num2StrF(R1));

ResetObject(H3);

end;

Begin

If FSActLayer=nil then

Begin

Message(date(2,2),' Nothing Selected');

R1:=DistDialog('Enter Window Marker Offset','12"');

H1:= getobject('Window');

N1:=NumRecords(H1);

H2:=GetRecord(H1,N1);

S1:=GetName(H2);

SetRField(H1,S1,'ControlPoint03Y',Num2StrF(R1));

end

else

Begin

Message(Date(2,2),' Almost DoIt');

R1:=DistDialog('Enter Window Marker Offset for Selected Windows','12"');

ForEachObject(DoIt,(((PON='Window') & (V) & (SEL=TRUE))));

End;

End;

Run(SetWindowMarkerOffset);

(************* And Here *************}

and paste into a blank vectorscript editor window from the resource browser.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×