Jump to content
Developer Wiki and Function Reference Links Read more... ×
WhoCanDo

Creating a wall with dotted center line

Recommended Posts

Hi,

 

I want to create a wall type with a dotted line cavity. image.thumb.png.8fdb9c9d577b8f0a7258f727b0a9d532.png

 

In VW2018 this worked ..

 

procedure test;
var Response : boolean;
begin
Response := DeleteAllComponents (nil);
Response := InsertNewComponentN (nil, 1,  5, 0, 10,  6,  0, 2);
Response := InsertNewComponentN (nil, 2, 20, 0,  6, 10, -2, 0);
SetTool (13);
end;
Run (test);
 

However in VW2019, it doesn't.

 

It seems that the -2 is the cause of the problem. -2 is the line type "Dash Style-2" from the standard pallet.

 

If -2 is changed to 2 in this script, the wall looks like above with a solid cavity line.

 

Can anyone suggest what changed between VW2018 & VW2019?

 

Please note: that I was using InsertNewComponent in VW2018 but now I am forced to use InsertNewComponentN 

Share this post


Link to post

Try using Name2Index('Dash Style-2') in place of -2, as the number will vary depending on the order the dash styles were imported into the drawing. Obviously the dash style will already need to exist in the file for this to work.

Share this post


Link to post

Thanks Julian, but that didn't work either ☹️

 

procedure test;
var Response : boolean;
begin
Response := DeleteAllComponents (nil);
Response := InsertNewComponentN (nil, 1,  5, 0, 10,  6, 0, 2);
Response := InsertNewComponentN (nil, 2, 20, 0,  6, 10, Name2Index('Dash Style-2'), 0);
SetTool (13);
end;
Run (test);

Share this post


Link to post

Sorry you will need to put a minus in front of Name2Index, but also note that you may not see the line is dashed because the line from the adjoining component is solid, so you might need to do something like this:

 

procedure test;
var Response : boolean;
begin
Response := DeleteAllComponents (nil);
Response := InsertNewComponentN (nil, 1,  5, 0, 10,  0, 0, 2);
Response := InsertNewComponentN (nil, 2, 20, 0,  6, 10, -Name2Index('Dash Style-2'), 0);
SetTool (13);
end;
Run (test); 

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

 

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.

×