The DataCAD Developer Network (DDN) is an online resource for information and support for DCAL® (DataCAD Applications Language) developers as well as anyone interested in creating fonts, toolbars, hatch patterns, or linetypes for use in DataCAD.

Moderator: pjdixit

#75974 by dhs
Wed Mar 13, 2019 1:44 pm
Hi,
Is anybody able to give me some guidance on the use ff the plvoid_add procedure in D4D. I am trying to add a void to a polyline but the drawing crashes on the plvoid_add call.
The following is the logic I am using:
Code: Select all      plvoid_init (ent, newvoid);      // ent is the entity I am trying to add the void to.  newvoid is an entity
      polyvert_copy (voident.plnfrst, voident.plnlast, newvoid.plnfrst, newvoid.plnlast);   // voident is an existing polyline entity that I am using to define the void
      plvoid_add (ent, newvoid);

Debugger reports a memory violation: Project DCADWIN.exe raised exception class $C0000005 with message 'access violation ....

Immediately before the above logic voident has just been retrieved using ent_near with a point selected by the user (I have used the debugger to confirm that it is a valid pln entity). Ent was also retrieved using ent_near somewhat beforehand in the logic (and I have also confirmed that it is a valid pln entity). I tried adding an ent_get (ent, ent.addr) call immediately above the logic shown just in case DCAD thought it hadn't been loaded recently enough, but that made no difference ...

Am I doing something wrong in the way I am calling plvoid_add, and if so does anybody know what is the correct sequence of calls to use this procedure?

Thanks,
David H.

Who is online

Users browsing this forum: No registered users and 0 guests

About DataCAD Forum

The DataCAD Forum is a FREE online community we provide to enhance your experience with DataCAD.

We hope you'll visit often to get answers, share ideas, and interact with other DataCAD users around the world.

DataCAD

Software for AEC Professionals Since 1984