Jump to content
  • 0

VW 2022 Hanging on its own Script/Macro


M5d

Question

I’m moving to 2022 and have a problem with a very basic tool/macro/plug-in created via the Custom Tool/Attribute... command and the Double-Line Polygon Tool. It makes a quick ground line plug-in that has worked ok in previous versions, but it hangs 2022 every time it’s run.

 

In the attached file the script has been re-created with 2022, but it still crashes Vectorworks. Any clues?

 

macOS 13.0.1 - VW 2022 SP5

 

Hanging.vwx

Link to comment

8 answers to this question

Recommended Posts

  • 0
43 minutes ago, Pat Stanford said:

I just submitted.  VB-192266

 

Ok, they’ve got two now, should be fixed twice as fast. 🙂 Where do you see the VB number after you submit? 

 

 

44 minutes ago, Pat Stanford said:

I tested back and it works in VW2021, but fails in VW2022 and VW2023.

 

Yep, I’ve used it as a plug-in for many many versions. Strange that it’s ok in the script editor, then crashes VW.

 

Link to comment
  • 0

It fails with the attempted execution of:

Result := InsertNewDLCompN(3, 750, 1, 0, 0, 0, 2);

 

Procedure CustTool;
{$DEBUG}
VAR
Name:STRING;
Result:BOOLEAN;
BEGIN
PushAttrs;
Result := DeleteAllDLComponents;
Result := InsertNewDLCompN(1, 35, 1, 0, 0, 2, 0);
Result := SetDLComponentName(1, '');
Result := SetDLComponentClass(1, 0);
Result := SetDLComponentFillColors(1, 257, 1241);
Result := SetDLComponentPenColors(1, 257, 256, 257, 256);
Result := SetDLComponentUseFillClassAttr(1, FALSE);
Result := SetDLComponentUsePenClassAttr(1, FALSE, FALSE);
Result := InsertNewDLCompN(2, 115, 1, 0, 0, 0, 0);
Result := SetDLComponentName(2, '');
Result := SetDLComponentClass(2, 0);
Result := SetDLComponentFillColors(2, 257, 1242);
Result := SetDLComponentPenColors(2, 257, 256, 257, 256);
Result := SetDLComponentUseFillClassAttr(2, FALSE);
Result := SetDLComponentUsePenClassAttr(2, FALSE, FALSE);
Result := InsertNewDLCompN(3, 750, 1, 0, 0, 0, 2);             {--------------------------CRASHES HERE------------------------}
Result := SetDLComponentName(3, '');
Result := SetDLComponentClass(3, 0);
Result := SetDLComponentFillColors(3, 257, 256);
Result := SetDLComponentPenColors(3, 257, 256, 257, 256);
Result := SetDLComponentUseFillClassAttr(3, FALSE);
Result := SetDLComponentUsePenClassAttr(3, FALSE, FALSE);
SetDLSeparation(900);
SetDLControlOffset(0);
SetDLOptions(1);
FillBack(256);
FillFore(257);
FillPat(0);
PenSize(0);
PenBack(256);
PenFore(257);
PenPatN(2);
CallTool(-218);
PopAttrs;
END;
Run(CustTool);

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
Answer this question...

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