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.
#12354 by Miguel Palaoro
Sat Jun 24, 2006 7:27 am
#12370 by Miguel Palaoro
Sat Jun 24, 2006 1:47 pm
Everything is fine, Pietro.

It's all set. DCAL DDN Forum is been great. And your contribution is consistent and qualitative. Keep it high.

Thanks,
Miguel
#12377 by Jsosnowski
Sun Jun 25, 2006 1:55 pm
When I refer to the next 'round' I am refering to the state machine that has been refered to for Datacad Macros. The other uses of the word never occured to me, however, in view of the world cup ...... ? Actually, if we use the sports analogy, I think we have a far piece to go to reach the finals. what do you think? :)

My understanding of the State Machine, is this:

DCAL macros are dll executables and as such have no life of their own. They are invoked by Datacad and all operations are managed by Datacad. WHen Datacad starts the DLL (macro), it knows very little about it other than to call a function entitled "Main". Main is created by the macro author using the same standard variables. These variables convey the basic information needed to inform Datacad what to do when it is expected to interact with the macro (eg 144 procedures such as getpoint, etc...), to designate a location for placing the results of these procedrures, and to inform the macor where to pick up when control is returned to it. Each time Datacad calls Main, it yields control to the DLL. When the macro needs input from Datacad that requires Datacad to regain the focus, the macro releases the focus. (This is what I refer to a s a 'round'). In order to pass focus bvack to the macro and have it continue from where it was, Datacad calls Main again, passes back the required input data in the Main parameters, and reminds the macro of where it was through the use of the act parameter. A good example of this iswhen preparing to get information from Datacad, the macro must inform Datacad of the type and size of the infomration it will require (refer to the code assoicated with the case of asize). The next 'round" Datacad will be ready to get the actual information and will know how to convey it properly to the macro. The macro can then act on data and continue on.

The only reason I can see (with my limited knowledge of programming) for passing the infomration through the State MAchine rather tha directly is that there can be multiple instances of Datacad invoking the DLL code at the same time and both Datacad and the macro DLL must know exactly what is transpiring each time it is invoked. This would also explain why it is necessaary to save any global data specific to a single operating instance to a file during each round.

Datacad programmers:
Please correct any misconceptions you spot in this dialog. Thanks!

Who is online

Users browsing this forum: No registered users and 48 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