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.
#10713 by rod_walker
Wed Mar 29, 2006 7:36 am
Hi,
the statement
Code: Select all rubln:=true;

results in 'left side cannot be assigned to.'
I had a quick look through the AEC_MODL samples which uses
rubln^:=true a pointer; but I am too lazy to wade through the logic.
UInterfaces.pas lists rubln as Function rubln:boolean; stdcall; external AppName 'GetSetRubln';
Any advice.
Thanks
Rod Walker
#10714 by devinder
Wed Mar 29, 2006 9:12 am
Rubln and Rubbx are functions which returns pointer to a boolean. To access the value, you must use dereference this pointer for boolean type and thus you have to use ^ notation. Your Uinterfaces.pas seems to be wrong, the correct declaration should be as follow:

Code: Select allFunction rubln: Pboolean; stdcall; external AppName Name 'GetSetRubln';


Yours define as a boolean whereas it should be PBoolean. If this is the case I would suggest you to get the header files again from http://www.datacad.com/ddn/downloads/DCAL%20for%20Delphi.zip

Using pointers this variable directly interfaces with the variable that is internally used in DataCAD.


Hope this helps.
#10737 by rod_walker
Wed Mar 29, 2006 5:28 pm
Hi,
I am using Delphi 4. When I initially installed Dcal for Delphi I had error messages about pboolean being undefined (or something like that), so I changed pboolean to boolean.
I will download latest version and try again
Thanks
Rod Walker
#10738 by devinder
Wed Mar 29, 2006 5:50 pm
if pboolean is undefined in your Delphi 4, you can add the following to URecords.pas

Code: Select allpboolean = ^boolean;


immediately after the declaration "type".
#10765 by rod_walker
Thu Mar 30, 2006 6:13 pm
Thanks Devinder,
added pointer as you advised. System working.

Rod Waker

Who is online

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