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

#76103 by dhs
Mon Mar 25, 2019 5:35 pm
I have some logic that is doing a SymRead and then creating some entities based on the symbol entities (but quite deliberately not actually adding any instance of the symbol to the drawing).
I am hoping that somebody can help me with a couple of questions:

  1. If I do multiple SymRead calls with different file names but using the same symname parameter (I was using something like 'Temp'), then it seems that the first symbol read is saved to the drawing file somehow and subsequent SymRead calls do not overwrite it (i.e. the subsequent SymRead calls do not work).
    Does anybody know if there is a way to delete the symbol that has already been read before the next SymRead call? (I've looked for a few variations, but cannot find a 'SymDel' (or similar) call in UInterfaces)
  2. To get around the above problem I am changing the symname parameter every time I call SymRead. This works fine, but assume I adding a whole lot of unused symbols to the drawing file somewhere, in which case should I be doing something to delete them (or will they be automatically deleted at some stage as they are not actually referenced anywhere) ? (if there is a 'SymDel' type procedure in answer to the first point then it also largely answers this question)

David H.
#76228 by dhs
Thu Apr 11, 2019 3:38 pm
Just a note about this question. I haven't found any way to delete the 'unused' symbols from the file (or to overwrite them), and don't know if they will ever be automatically purged.

But I have realised that it is possible to prevent an untold number of symbols being added to the file. I am now basing the symname parameter on the actual file name: I am appending a timestamp to the filename and using that as the symname parameter (the timestamp is based on the last modified date/time of the file to ensure that I can read a new copy of the symbol if the file is modified).

Initially I was using something like 'temp' but it was not possible to overwrite the symbol that had been read in subsequent calls. I then changed to using a different symname every time I called SymRead (this works, but has the potential to add an untold number of symbols to the file - not ideal, but probably not a problem in these days of massive amounts of storage and memory).

David H.
#76229 by joshhuggins
Thu Apr 11, 2019 3:57 pm
Hi David,

Users have the option in the DCADWIN.INI file to have unused symbols to be automatically purged from the drawing on exit, which I would think should work for ya. I would hope/recommend everyone use this to keep their files nice and speedy. Below are the related INI entries.
Code: Select all[General]

#76230 by dhs
Thu Apr 11, 2019 4:35 pm
Thanks Josh,

You have answered my initial question, but I will leave my logic as it is for those who don't have this option set (which may be quite a few, as my default install of Dcad has 'Symbols(Automatic)=FALSE' and also 'Symbols(Manual)=FALSE').

David H.

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