Jump to content
Developer Wiki and Function Reference Links ×

Wall script


DanielB

Recommended Posts

We have a script pallet with several predefined walls. The scripts have been around since VW version 8 or so and have finally quite working with version 12. We've rewritten them as follows but have the problem that after drawing one wall (even after simply turning a corner)the width reverts to the default. Can anyone help? Thanks.

PROCEDURE TwoBySixStudWall;

VAR

h :HANDLE;

boo :BOOLEAN;

BEGIN

NameClass('plan-walls new');

CallTool(-208);

h := FSActLayer;

boo := SetWallHeights(h,96,96);

boo := SetWallThickness(h,5.5);

END;

RUN(TwoBySixStudWall);

Link to comment

Hi Daniel,

This is not the script you had running in VW8 (9, 10 or 11 either). SetWallHeights() & SetWallThickness() are calls new to VW 12. You should look in some older documents for the original code.

That aside, the script you show selects the Wall Tool then modifies ONLY the first segment (selected with FSActLayer) AFTER the wall is drawn. I assume you want a script that sets the Wall Tool parameters before the tool is used to draw walls. I see the VS call SetWallWidth() has been made obsolete as of VW12, but for now, it still works. I'm not sure what the replacement call is, if any. To set the class and wall thickness, the following will work (for the moment) to create an UnStyled Wall. I believe the height will be controlled by the layer separation.

code:

PROCEDURE TwoBySixStudWall;

BEGIN

NameClass('plan-walls new');

SetWallWidth(5.5); { sets wall tool thickness }

CallTool(-208); { selects wall tool }

END;

RUN(TwoBySixStudWall);
[/code]

To use the newer calls you will have to write a loop to act on each wall segment. Your script could be modified to operate on all the recently drawn wall segments, but setting the wall thickness with the new command SetWallThickness() only scales the wall as drawn and any mitered ends will become distorted. The "re-scaled" wall segments will then need to be rejoined if you want your walls to look good in 3D views as well as in 2D.

I'm sure some wall savvy scripters can help you better than I.

Raymond

[ 03-16-2006, 12:09 AM: Message edited by: MullinRJ ]

Link to comment
  • 2 weeks later...

Thanks for your suggestions. Interestingly the (obsolete) call SetWallWidth sticks from one segment to the next but SetWallThickness(h,5.5) does not. Nor does SetWallHeights(h,96,96).

I've also been experimenting with SetTool but have not had any luck with my issues either.

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