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

#73977 by dhs
Sun May 27, 2018 4:24 pm
Hi All,
I am having a problem where the display is not updating as I expect. I'm hoping that somebody can throw some light on it (I'm thinking Dave, but if anybody at all has any suggestions I would be glad to hear them...).

It revolves around the following code snippet:
Code: Select all         res := getpointp (pt, Mykey, vmode_orth, false);
         if res = res_normal then
         elsif fnkeyconv(MyKey) < 0 then
            msg_ok ('debug');

At the time this code is called some entities on the screen have been highlighted by a procedure that does the following steps:
- temporarily renames the DC_FILL attribute (and updates)
- changes the line-type to dashed (not updated)
- draws the entity to screen
- renames attribute back to DC_FILL (and updates)

The UnHilite procedure called in the above snippet basically loops though all the highlighted entities and draws them in black and then in white. This same procedure is effective in unhilighting the entities when I press S0 in the macro (not shown in the code shippet), but I added the regen in the escape handling because Unhilite was not working as expected in this case (the msg_ok added to try to work out what was happening).

Depending on the escape key that is pressed I am seeing different retults from the above snippet. It is perhaps best explained by the following short video :

I expected that the regen would refresh the screen and that all the highlighting would be removed before the msg_ok was called, but this has not happened in any of the cases in the video:

When I press 's' the lines are re-drawn but the fill is not redrawn until after the msg_ok. The end result is acceptable and I enter the new snap grid sizes and the entities are again hilighted on return to the macro. I guess I can understand this on the assumption that the display list is being updated in a different thread, so although not exactly what I was expecting, I am not that surprised.

When I press 'Alt/s' the fill is not redrawn until after the 3rd (?!) Msg_ok. Although the end result is satisfactory, I can't for the life of me see where the 2nd and 3rd msg_ok's are coming from as the code calls msg_ok and then immediately calls globalesc.

When I press 'm', the lines are re-drawn solid but the fill is not restored when the msg_ok happens. But once I dismiss the msg_ok the highlight returns. Pressing 'Esc' to redraw does not remove the highlight, but a regen does remove it (so I know the entities are correct in the database). I am really having trouble getting my head around this one ... it is as though the old display list is being restored by the Move functionality. Putting a pause in the code did not help.

This is more of an inconvenience than a serious bug in my macro (it will probably not be that common for users to press an escape key at this point, and nothing is corrupted and the display can be fixed by a simple regen), but I am curious to know if there is anything I can do to fix the problem, or at least to understand the mechanics of why it is happening.

Interestingly Joe Sosnowski has done a quick test of this for me, and he experienced more instances than I did when the highlight was not cleared (if he exited out of the menu using S0 then the highlight remained, whereas for me that is working ok ... this happened for him in DC20, but not in DC19). The only difference I can think of here is the speed of our computers (I am using a relatively low-spec laptop).
#73978 by dhs
Sun May 27, 2018 4:31 pm
... looks like the youtube tag doesn't work as I expected (at least when I view it). The video referred to in my post is at

Is there some problem ... I tried inserting a URL link but that didn't work either when I previewed the post, so have just pasted the URL link as text.
#73983 by joshhuggins
Tue May 29, 2018 11:49 am
For embedding the videos I usually have to put the full domain path that uses the watch?v= video ID in order for it to work vs the short versions they provide via their share tools. It's usually easiest to grab the path from the Share, Embed code on YouTubes site, just remember to strip out the /embed from the path. The short or full video url will work when creating a hyperlink using the format below.

Code: Select all//Embedded YouTube Video

//YouTube Video Link (Bold, Italic Text)
[b][url=]This video Link[/url][/b]

This video Link

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