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.
#26755 by Jsosnowski
Fri Aug 03, 2007 10:33 am
I am writing a macro in the original Legacy version of DCAL (from Datacad version 9), something I have not done i n quite a while and hit a small bug.

To generate menus I have used the steps:
lblsinit;
lblset (1, name);
lblmsg (1, 'A message');
lblshow;

When the macro operates, the menu item shows up, but the message will not appear either in the message area at the bottom of the screen or as a hint adjacent to the function key menu. Is there a setting or something that I have neglected?
#26757 by Jon C. Hubart
Fri Aug 03, 2007 12:19 pm
This may be a typo but I think you should be using lblson not lblshow.
#26758 by Jsosnowski
Fri Aug 03, 2007 12:27 pm
It is a typo. I used lblson;
#27194 by Jsosnowski
Tue Aug 21, 2007 8:42 am
OK I got back to this problem after a few days and still cannot see why the messages do not appear when the mouse is over a menu button. What am I missing? :oops:

Here is an example that fails:

Program test;
VAR
Done : Boolean;
Key : integer;

PROCEDURE doLbls;
BEGIN
lblsinit;
lblset ( 1, 'File');
lblmsg (1, 'Select File');
lblsett (10, 'DoLyrs', true);
lblmsg (10, 'DO something');
lblset (20, 'Exit');
wrtlvl ('TEST');
lblson;
END doLbls;

PROCEDURE doesc;
VAR
Kaput : boolean;
Tempoffset : real;
BEGIN
IF key = s0 THEN
done := true;
END;
END doesc;

BEGIN
Done := false;
Repeat
doLbls;
getesc (key);
doesc;
until done;
END test.
#27196 by Jon C. Hubart
Tue Aug 21, 2007 9:08 am
See the attached image.
Image
When I compile the test you sent I am seeing flyouts and the message at the bottom of the screen. Are these what you are referring to? The "Select File" messages?
#27197 by Jon C. Hubart
Tue Aug 21, 2007 9:17 am
The only thing I can think of is an interface problem. You mention "the message area" in your original post but these messages are displayed on the "Coordinates / Hints" toolbar. Do you have that one turned on?

As for the flyouts, do you have your tooltips, Display Delay set too far to the right? Try moving it all the way left and see if that helps.
#27199 by Jsosnowski
Tue Aug 21, 2007 9:26 am
Yes, I don't get them on mine. Although I ran another macro (roof-it) that containes them in the code and the flyouts work. I am compliling using DCAL 5.00 Do you know which version you are using?

If not, you can find out when you run DCC1. If the messages run to fast, reroute the text to a file (eg dcc1 \Datacad\DCAL\test >test_a.rpt

Thanks
#27200 by Jsosnowski
Tue Aug 21, 2007 9:37 am
The settings are all the way to the right for display delay.
Coordinates are displayed when the cursor is moving in the drawing area.
#27201 by Jon C. Hubart
Tue Aug 21, 2007 9:45 am
Jsosnowski wrote:Yes, I don't get them on mine. Although I ran another macro (roof-it) that containes them in the code and the flyouts work. I am compliling using DCAL 5.00 Do you know which version you are using?

If not, you can find out when you run DCC1. If the messages run to fast, reroute the text to a file (eg dcc1 \Datacad\DCAL\test >test_a.rpt

Thanks

Compiler Version 5.00

Linker Version 4.01
#27202 by Jon C. Hubart
Tue Aug 21, 2007 9:50 am
If you want to post your e-mail address I can send you the version I compiled and you can see if you get flyouts on your system.
#27223 by Jsosnowski
Tue Aug 21, 2007 3:56 pm
I received your macro and tested it on my machine. No flyouts. There is definitely something squirrelly at my end. It must be a setting, but I can't find it. First time anything's ever gone wrong ......

Thanks
#27233 by rod_walker
Wed Aug 22, 2007 6:30 am
I am searching my memory a bit; but I think there is/was a bug.
I looked back thru my old code and seems my work around was to use getpoint(p,key) which does let flyers display. ie write a new getescape .

Rod Walker
Code: Select allPROCEDURE getescape(k:OUT integer);
 VAR
  result,key   :integer;
  p      :point;
  done      :boolean;
 

  BEGIN
  setpoint(p,0.0);
  done:=FALSE;
  REPEAT
   result:=getpoint(p,key);
   IF result=res_escape  THEN
    k:=key;
    done:=TRUE;
    END;
  UNTIL done;
  END getescape;
#27297 by rod_walker
Thu Aug 23, 2007 9:18 am
Joe
I compiled your macro and flyers worked on my new machine; but on my previous machine I had the same problem.

Modifying your code with a new 'getesc' based on getpoint achieves the same result with flyers.
Code: Select allProgram test;
VAR
Done : Boolean;
Key : integer;



PROCEDURE getescape(k:OUT integer);{this is new getesc}
 VAR
  result,key   :integer;
  p      :point;
  done      :boolean;
 

  BEGIN
  setpoint(p,0.0);
  done:=FALSE;
  REPEAT
   result:=getpoint(p,key);
   IF result=res_escape  THEN
    k:=key;
    done:=TRUE;
    END;
  UNTIL done;
  END getescape;

PROCEDURE doLbls;
BEGIN
lblsinit;
lblset ( 1, 'File');
lblmsg (1, 'Select File');
lblsett (10, 'DoLyrs', true);
lblmsg (10, 'DO something');
lblset (20, 'Exit');
wrtlvl ('TEST');
lblson;
END doLbls;

PROCEDURE doesc;
VAR
Kaput : boolean;
Tempoffset : real;
BEGIN

IF key = s0 THEN
done := true;
END;
END doesc;

BEGIN
Done := false;
Repeat
doLbls;
getescape (key);{replaces getesc}
doesc;
until done;
END test.


Rod Walker
#27310 by devinder
Thu Aug 23, 2007 12:03 pm
Could you email your Dcadwin.ini and the dcx macro to techsupport
#27383 by Jsosnowski
Sun Aug 26, 2007 1:50 pm
I forwarded the macro and inin file to tech. support.

Who is online

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