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.
#68598 by barak
Mon Apr 18, 2016 12:45 pm
when i write a dcal, the variables stay constantly in memory.
even for other drawings or after closing the datacad and openning again.

where the values are stored?
how can i store variable that its scope exits in the drawing only.

for example i wrote a program that count from 1 and write at each click the count on the drawing.
but, when i activate the macro in other drawing it continue from the recent count.
and even if i close the datacad. and open new drawing' it continues.

can anyone clears the varibles scope issue for me.
thanks
barak
#68602 by David A. Giesselman
Mon Apr 18, 2016 2:49 pm
Your variables are stored in the macro (.dcx) file itself. A compiled DCAL macro contains its own data space for the storage of declared variables. If you wish to use drawing-level variables that are persistent across drawing sessions, I would suggest using drawing attributes.

Regards,
Dave

Who is online

Users browsing this forum: No registered users and 24 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 Architects Since 1984