Jump to content
Sign in to follow this  
John P

Script hangs Mac if Wall tool selected.

Recommended Posts

VW8.5.1 on G4. Using "Custom Tool/Attribute", I am trying to create a tool so that all our staff will create walls in the same pen, fill type, line type and class.When I run the created script, it changes the active class, pen etc correctly, but stops when it trys to select the wall tool. I have to sit clicking the mouse and after between 2 and 10 seconds wall preferences dialogue is eventually displayed. Often it does not even get this far and the machine hangs.I have tried a script without the tool option selected and that works fine, changing the class, colours etc with no problems.

How can I get the script to change active settings and then select a tool without hanging the machine?

(Please excuse my ignorance. Although we have been using Vectorworks for a long time, we have only just begun setting up scripts to standardise our work.)

Share this post


Link to post

i don't really know what might going on, but maybeupdating to the (free) V. 8.5.2 might help?

Also if you want feel free to sending me the script and i'll take a look at it.

-Hannes

Share this post


Link to post

Thanks very much Hannes, I'll send script for you to look at for us, if you don't mind. John.

Share this post


Link to post

Hello John,

Maybe you'r wall tool wasn't active if you run the custom tool command.

Your code includes this line:

CallTool(-128);

-128 is the tool constant for the 2d selector.If you change the number into

CallTool(-208);

your script will call the wall tool.

I hope this helps.Kind regards,Hannes

smile.gif" border="0

Share this post


Link to post

You are quite right Hannes, I'm sorry I sent wrong script! This is the one which was playing up (any other ideas?) Thanks very much, John.

Procedure CustTool;VAR Name:STRING;Result:BOOLEAN;BEGIN PushAttrs;ClearCavities;PenSize(7);PenPat(2);AddCavity(TRUE, 5.3937008", 1.4566929", 35);PenSize(7);PenPat(2);AddCavity(TRUE, -5.3937008", -1.4566929", 35);DoubLines(0");PenSize(7);PenPat(2);SetZVals(0", 0");FillFore(255);FillBack(0);FillPat(1);PenFore(255);PenBack(0);PenPat(2);PenSize(7);PenPat(2);Marker(0, 0.125000, 15);

NameClass('Walls');CallTool(-208);PopAttrs;END;Run(CustTool);

Share this post


Link to post

quote:

Originally posted by John P:
You are quite right Hannes, I'm sorry I sent wrong script! This is the one which was playing up (any other ideas?) Thanks very much, John.

Procedure CustTool;VAR Name:STRING;Result:BOOLEAN;BEGIN PushAttrs;ClearCavities;PenSize(7);PenPat(2);AddCavity(TRUE, 5.3937008", 1.4566929", 35);PenSize(7);PenPat(2);AddCavity(TRUE, -5.3937008", -1.4566929", 35);DoubLines(0"); {<<<set here your wall thickness, then it works.

PenSize(7);PenPat(2);

SetZVals(0", 0"); {<<<Attention, this line set's the layer's Z-values, in this case to zero.If you WANT to change the Layers Z-value trought this script then fill in the proper values, if not delete this line

FillFore(255);FillBack(0);FillPat(1);PenFore(255);PenBack(0);PenPat(2);PenSize(7);PenPat(2);Marker(0, 0.125000, 15);

NameClass('Walls');CallTool(-208);PopAttrs;END;Run(CustTool);

Kind Regards,Hannes

smile.gif" border="0

[ 01-03-2002: Message edited by: Hannes ]

Share this post


Link to post

Hi,

In the past we had the same problem as your script. Firstly, maybe it is a good idea to use SetTool instead of CallTool (at least this solved the problem for us). Secondly the number to use is -208 for the wall tool not -128.

I will take a closer look at your code in the weekend, and I will try it.

In the meantime have a nice weekend.

Friendly greetings,

StarGate

Share this post


Link to post

Hello John,

As promised I look at your code and I found out which could be the cause of your error.

You have to remove two instructions of your code :

pushattrs;popattrs;

The first instructions saves your environment the second restores them to the state where pushattrs is called. I try this at my home with VectorWorks 9.5.2 Dutch version.

It is very foolish of me that I did not see that earlier because in the past I ran into the same problem. I adjusted your code and you will find it under this text.

I wish you very much success and a very nice day.

With friendly greetings,

StarGate

Procedure CustTool;VAR Name:STRING;Result:BOOLEAN;BEGIN ClearCavities;PenSize(7);PenPat(2);AddCavity(TRUE, 5.3937008", 1.4566929", 35);PenSize(7);PenPat(2);AddCavity(TRUE, -5.3937008", -1.4566929", 35);DoubLines(0"); {<<<set here your wall thickness, then it works.

PenSize(7);PenPat(2);

SetZVals(0", 0"); {<<<Attention, this line set's the layer's Z-values, in this case to zero.If you WANT to change the Layers Z-value trought this script then fill in the proper values, if not delete this line }

FillFore(255);FillBack(0);FillPat(1);PenFore(255);PenBack(0);PenPat(2);PenSize(7);PenPat(2);Marker(0, 0.125000, 15);

NameClass('Walls');CallTool(-208);END;Run(CustTool);

Share this post


Link to post

Hello again,

Sorry I made a mistake in the version number of Vectorworks. I wrote 9.5.2 Dutch edition which was faulty. It has to be 8.5.2 Dutch edition.

Friendly greetings,

StarGate

Share this post


Link to post

Thanks very much Hannes, Sir Dan, Stargate. I'll try and see if I can get it working. I'm glad theres so many helpful people watching this forum!

Share this post


Link to post

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.

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.

×
×
  • Create New...