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

#72039 by dhs
Tue Aug 08, 2017 4:14 pm
Decided to convert one of my existing DCAL macros to D4D and went looking for the D4D equivalent of getmode. But I can't find it.

Does anybody know if there is a D4D equivalent to getmode?
I could not find a single example of a selection menu in the D4D samples provided.

My assumption is that I will need to write the selection logic myself. Not an enormous task, but I don't want to go to that effort if something is already provided.

David H.
#72065 by Jsosnowski
Thu Aug 10, 2017 2:56 pm
I second Dave's question. I am translating some macros from DCAL to D4D and make use of the getmode function in many places. Before reinventing the wheel, does anyone have sample code for this ?
#72066 by dhs
Thu Aug 10, 2017 3:14 pm
Hopefully there is a provided equivalent to getmode that I haven't been told about yet!

I haven't spent that much time on it yet but am partway through coding my own version of getmode.
A bit more complicated than I originally envisioned as I hadn't thought about the Mask & Crossing options.
In terms of the Crossing option, there is a greedy_box field in the mode_type record { bit0 = box; bit1=greedy }. I'm assuming that 'greedy' is equivalent to Crossing ? Is setting this field the mode record the best way to implement crossing?
#72067 by dhs
Thu Aug 10, 2017 3:50 pm
Another question on the (hope not) assumption that I need to code my own version of getmode:

The standard interface has a 'Previous' button on the Mask menu. In order to replicate this in my own version of getmode I need to be able to access the previous selection (presumably a mode_type variable). Is this previous selection available to D4D (at a quick look I cannot find a likely candidate in the header files) ?

Who is online

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


Software for AEC Professionals Since 1984