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

#71953 by Jsosnowski
Sun Jul 30, 2017 2:30 pm
I am working on several DCAL for Delphi macros and some extended documentation for how to use D4D. I just compiled the dll for the project creating AEC_MODL.dmx and attempted to run it (I still use Datacad 12). The macro will not load and gives me an error message "Incorrect Macro Version". I have compiled other macros I have recently written and they load fine without an error message. My question then is what is different about this macro that prevents it from loading?
#71963 by dhs
Mon Jul 31, 2017 7:03 pm
Hi Joe,
I'm afraid I can't be of much help regarding the particular error. I assume you are using the Delphi library files supplied with v12, so you wouldn't expect a problem like this. Did v12 come with the compiled versions of the sample macros? If so, does the supplied compiled version run ok? Would be happy to try your compiled version of the macro on my DC19 if you felt like sending it to me (just to see if it is indeed the version of DataCAD that is the problem).
If I am thinking of the right macro, then I think it also requires a message and label file in the correct path, but it should give appropriate message(s) if those are missing.
We really do need some extended documentation on D4D. I am thinking of adding notations to the existing DCAL Manual regarding the differences in the D4D implementation (which is in all honesty similar enough that I think notations about the differences would be quite helpful even if a whole new manual was not available).
David H.
#71965 by Jsosnowski
Mon Jul 31, 2017 7:49 pm
I am currently writing a 6-8 part posting to document the operation of the D4D macros. There are a couple of things that are not clear that I am researching. That is why I wanted to run the AEC_MODL macro to review a few things that are giving me problems. Thanks for the offer to run it, but I really need to run it here and add some monitoring code so that I can understand a few loose ends better.

If you are actively coding and are interested, I would love to discuss some of the other issues and questions I have unearthed.

#71973 by Joseph Baron
Tue Aug 01, 2017 12:32 pm

I am actively coding in DCAL but I have not yet taken the plunge into D4D. I would very much like to stay in this loop especially about the D4D notations getting into the DCAL manual.

Some of the things I am looking at in D4D is be able to interrogate an AEC file for data and be able to auto generate and open a Word or Excel document with that populated data.

This is probably supposed to be under a separate topic but do you guys know if that is possible?

#71976 by dhs
Tue Aug 01, 2017 2:20 pm
Hi Joseph,
The DCAL for Delphi macros are effectively DLLs, so you should be able to do whatever you can using normal Delphi code. It should be possible to write Excel or Word files (you should find plenty of information about this on the web, see for example

Of course with a bit of work you could write a csv file using Classic DCAL and Excel will open that just fine.

#71978 by Jsosnowski
Tue Aug 01, 2017 7:36 pm
@Joseph Baron

Stay tuned. I am in the process of writing a tutorial of sorts for using DCAL for Delphi to write macros which I intend to publish as posts in this forum in the near future.

As for your question regarding reading data directly, Datacad does not publish its data structure so a direct reading of the .aec file seems an impossible task. On the other hand, DCAL provides tools for a comprehensive reading of the contents of a file with nearly every setting for every setting, entity, layer, view, attribute and other elements contained in the program. DCAL for Delphi (D4D) utilizes most of the same methods, variables, & etc. The primary differences are in user interface methods. Most of original DCAL interfaces that are replaced are listed in the uInterfaces.pas file provided by Datacad. I expect the tutorial I am preparing will give you a path to implementing them.

If you have specific questions add another topic post. I expect to be monitoring this form more now as I get engaged in coding D4D macros.

#71994 by Joseph Baron
Thu Aug 03, 2017 12:27 pm
Thanks to you both David & Joe,

I'm familiar with DCAL generating CSV comma delimited files then reading into excel with several macros I have in place.

What I'm looking for is something that can automatically generate MS office docs from AEC file data sent to it much like how I have Excel files auto generating emails and other docs with VBA.

I appreciate the responses.

Who is online

Users browsing this forum: No registered users and 1 guest

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.


Software for AEC Professionals Since 1984