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.
#12327 by Jsosnowski
Thu Jun 22, 2006 9:22 pm
I'm not certain I understand what you are asking. I believe the setlocalsize call is for memory allocation so that Datacad knows how much memory to allocate. This request is made when Datacad requests the value by setting act to aSize. I assume that a default value is set up when the macro is first started and without a change in value the macro continues under the default. In the next round of communication the act value is changed to AFirst so that your macor knows its current state and therefore how to procede. Please elaborate on your question more.
#12354 by Miguel Palaoro
Sat Jun 24, 2006 7:27 am
StudioPM wrote:...desire is to evolve from a legitimate guess ("I believe", "I assume") to a positive and responsible declaration telling me what exactly happens,...
... What "next round", please? I haven't asked for any such "next round"...

Hello Pietro,

Take it easy please! Are you upset with Joe's 'legitimate' explanations ?
While you are 'legitimately confused' with the macro settings, Joe is truly commited to help you on your track.

The 'next round' was actualy '...in the next round of communication...' it was not a fight.

Be a peaceful fighter, Pietro. World Cup is increasing temperature, and Italy is in the second round. Avanti 'azzurra' team.

(That's enough for a saturday morning.)

Thanks,
Miguel
#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 23 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