WhoCanDo Posted January 31, 2019 Share Posted January 31, 2019 Hi, I want to create a wall type with a dotted line cavity. 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 Quote Link to comment
Julian Carr Posted January 31, 2019 Share Posted January 31, 2019 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. Quote Link to comment
WhoCanDo Posted January 31, 2019 Author Share Posted January 31, 2019 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); Quote Link to comment
Julian Carr Posted January 31, 2019 Share Posted January 31, 2019 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); Quote Link to comment
WhoCanDo Posted January 31, 2019 Author Share Posted January 31, 2019 Thanks Julian, I can work with that 😊 Quote Link to comment
Recommended Posts
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.