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.
#13443 by devinder
Fri Aug 25, 2006 11:25 am
An untested example :wink:
Code: Select allvar
   laddr : lyraddr;
   ent  : entity;
begin
   ent_init(ent, entcrc);
   ent.color := 15;{any color index from 1 to 255}
   ent.crcrad := 3 * onefoot; { 3 foot radius}
   {Circles center is initialized at 0,0,0 with base and height at 0. Change other paramters}
   ent_add(ent);
 { All entities gets added to current layer}
   if lyr_find('Layer2Find',laddr) then
   begin
     if not lyr_islocked(laddr) then
     begin { programmer should make sure layer is not locked otherwise entity will not update}
         ent.layer := laddr;
         ent_update(ent);
      end;
   end;
end;
#13457 by devinder
Sat Aug 26, 2006 8:09 pm
My mistake too. All entities gets added with current state parameters, i.e. color/linetype/spacing/etc when ent_add is called. DCAL users can only update entities after it has been added to the database. Try the following.
Code: Select allent_init(ent,entmrk);  //init point (marker) "entity" type
ent.mrktyp:=1;
  pnt.x:=...
  pnt.y:=...
  pnt.z:=...
ent.mrkpnt:=pnt;
if ent_add(ent) then
begin
   ent.color := 15; {Set new color}
   ent_update(ent);
   ent_draw(ent,drmode_white);  //complete entity creation
end;

MrkSiz is not a valid parameter of point and not used to draw the point, and should not be part of DataCAD entity.
Only following Mrktypes are valid:
0,1 -> Square type like reference points.
2 -> Cross like symbol insertions
3 -> Diamonds like bezier/bspline
4 -> Dot on screen
5 -> Square ,large size
6 -> cross, large size

Anything else is not defined and will not draw anything.

Who is online

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