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.
#11486 by Jsosnowski
Thu May 11, 2006 8:09 pm
I think you correctly identified Currentstate, a Function returning Pstate listed in UInterfaces. The Pstate record references global variables held in DataCAd used to draw lines and entities. Each Layer on a drawing holds a State Record. When it becomes active the current drawing settings in Datacad are set to match that layer. Any graphic entities are generated using these settings until changed by the owner. In which case they become the current settings. The variables are explained in the Variables section of the old DCAl reference manual although they were identified individually rather than as part of a record and not all of them were stored in layer settings. I believe factor is a ratio used against a default spacingf for defined linetypes. This would expand or contract the dashes in a dashed line over greater or lesser distances. Overshoot refers to practice in hand drafting of extending a drawn line beyond the end point used way back in the last millenium, two intersecting lines, for instance, would not end at the corner, but extend slightly beyond the intersection like a "+" sign placed at the corner. Weight is the thickness of the line and if I remember, attr is a hidden identifier originally placed in entities, but for the most part unused. Hatch lines, if I remember correctly use this field as a marker that allows hatching to be ignored in searches if the search settings are set correctly.

Is this what you were asking?
#11504 by devinder
Fri May 12, 2006 10:39 am
Currentstate yields a pointer to a record and not just the result. Since it is a pointer, you can modify the values in it as well. The fields reflects the current color,linetype,etc from your drawing. When you change color in datacad, this field will change. If you change the color parameter then color changes within datacad. Depending on what you are doing, the changes in the DataCAD's status bar might not be visible immediately but your cursor color will change immediately. To add further there are limitations for some fields you should keep in mind.
Color : Range 1 to 255 only.
LineType : Range 1 to 255 only where 1= solid, 2=dotted, 3=dashed, 4 = dot dash, beyond 5-255 represents custom linetypes loaded into drawing. Macro should not set a reference to this index directly because linetype index may or may not be allocated for the custom linetype. You should call menuLinetype API and let it set the current linetype.

All fields of state are set in DataCAD's menu API -> menulinetype.

These fields could have Byte type, but keeping our doors opened for future we have used integer fields.

Who is online

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