Hi,
Here it goes and I hope this is understandable. I am a programmer
1. WantType/dcalstate: This is just a unique ID assigned to a function so that DATACAD knows which function it has to call next. So if you are writing a complex macro then you will need more of these states, as in the case of AEC_MODL macro.
2. act : This could be one of (Afirst, Alast, Aagain, AlSize).
AlSize -> Called only once when state is called for the first time by DataCAD. Macro should tell DataCAD how much local memory it should allocate for your pointer to local record that pl uses. All your variables should for this state should be defined in local record (eg. ArrowL). Though you can have all your variables as global I would not recommend it because in complex macros where you can have multiple states, manageability and re-usability of same code can become an issue.
Afirst -> After the memory has been allocated it is time for initializing it. AFirst tells you can initialize all your parameters at this point. It is in AFirst you specify the first local state number, the state is in. This is the right time to read any INI settings for your macro.
Alast -> This is the last call from DataCAD to this subroutine. Users should clear out any temporary data they have generated or finish any unfinished process. Memory allocated for pl local record (allocated by Alsize) will be freed when DataCAD gets control.
Aagain -> This tells pl and pargs are active variable records and hold information and macro writer decides how the flow of program works.
3. pl : This is a pointer to local record, which can contain variables and track in what state the program is in, while moving from one menu level to another. (eg. pl is a pointer to ArrowL).
4. pargs : This is a pointer to the record that is passed by your calling function to a new menu. This is used when you want to send/update parameters from one state to another state. Eg. when calling getpoint function you pass a variable which is type getpointArg, this variable holds the mouse click, mouse status or keyboard status. This status is set in a different dcalstate called getpoint.
DataCAD controls these states/variables and you should not update these variables directly.
Hope this helps.
Here it goes and I hope this is understandable. I am a programmer
1. WantType/dcalstate: This is just a unique ID assigned to a function so that DATACAD knows which function it has to call next. So if you are writing a complex macro then you will need more of these states, as in the case of AEC_MODL macro.
2. act : This could be one of (Afirst, Alast, Aagain, AlSize).
AlSize -> Called only once when state is called for the first time by DataCAD. Macro should tell DataCAD how much local memory it should allocate for your pointer to local record that pl uses. All your variables should for this state should be defined in local record (eg. ArrowL). Though you can have all your variables as global I would not recommend it because in complex macros where you can have multiple states, manageability and re-usability of same code can become an issue.
Afirst -> After the memory has been allocated it is time for initializing it. AFirst tells you can initialize all your parameters at this point. It is in AFirst you specify the first local state number, the state is in. This is the right time to read any INI settings for your macro.
Alast -> This is the last call from DataCAD to this subroutine. Users should clear out any temporary data they have generated or finish any unfinished process. Memory allocated for pl local record (allocated by Alsize) will be freed when DataCAD gets control.
Aagain -> This tells pl and pargs are active variable records and hold information and macro writer decides how the flow of program works.
3. pl : This is a pointer to local record, which can contain variables and track in what state the program is in, while moving from one menu level to another. (eg. pl is a pointer to ArrowL).
4. pargs : This is a pointer to the record that is passed by your calling function to a new menu. This is used when you want to send/update parameters from one state to another state. Eg. when calling getpoint function you pass a variable which is type getpointArg, this variable holds the mouse click, mouse status or keyboard status. This status is set in a different dcalstate called getpoint.
DataCAD controls these states/variables and you should not update these variables directly.
Hope this helps.
Devinder S Verman
DATACAD LLC
DATACAD LLC