Jump to content
Developer Wiki and Function Reference Links ×

Runtime error occurs due to script

James Pitt

Recommended Posts

More of an enquiry really as to whether anyone else has written a script which causes the standard Visual C++ runtime error.

"This application has requested the runtime to terminate it in an unusual way".

This error only occurs in the one script I am producing and has not occured in previous revisions of the same script. Can anyone help?

James Pitt

Tested on Vectorworks 10.1 -> 10.5.1 (Windows)

Link to comment

Additionally, it may be worth a mention that the script compiles ok, it even completes ok, and I can view the drawing it creates. However, once I have zoomed in and out a little, or everytime I close the drawing it produces the error. The script is over 49kb in size. Is there a limit? Is there an error log?

Link to comment

I believe I have identified the cause of the problem, however I still don't understand why.

{In the case below handles have been assigned to the first stud and the last stud and also during a loop to all the inbetween studs using a dynarray. A flatstrap is placed over these in certain cases and we must show the overlap, hence intersect and clip}

referenceflatstrap := LNewObj;

FOR i := 1 TO totalstuds DO BEGIN


h := IntersectSurface(referencestud,referenceflatstrap);



Link to comment

I'm having a similar problem, with a script forcing VW to crash after running it a few times and zooming or modifying the drawing in any way. Even after a single run, I know that soon or later the app will quit.

I never found a cause, but the 2000 lines of script compiles and debug flawlessly... the only message I get is the "reassign a dynarray could cause the loss of data".

At the moment I'm working on a new version with a new approach trying to overcome the problem. But I will look a the overlapping variables to see if is the cause!

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.

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