Update Lisp Code accordingly to Varnames

Started by alfwerner, May 28, 2015, 01:27:57 PM

Previous topic - Next topic

alfwerner

After populating a form with a lot of controls I often find the lisp code hard to read. I have search a method to afterwards update my Lisp accordingly to the "VARNAMES" of the controls. As long as I can see this will not bee done in OpenDCL. Firstly I think that "Set Lisp Symbol Names" was about this but obviously I was wrong. Later I found a routine "odcl8-update" written by Owen Wengerd which I possibly can manipulate to solve my needs. I just wonder if it is possible to extract the name of Lispfile from the DCL-project. This code presumes that the main part of the name is the same as the name of the project.

Thanks for a great program!

Alf

Peter2

Quote from: alfwerner on May 28, 2015, 01:27:57 PM...to afterwards update my Lisp accordingly to the "VARNAMES" of the controls. ...
Maybe I don't understand what you are looking for, but the help-file has a fantastic "dynamic code creation" - all the "Get Function" and the "Set Functions" are created, depending on the control where you started the help. And with the "copy to clipboard - buttons" you can use the code-snippet without typos ...
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

owenwengerd

There are two ways to specify symbol names: assigning each control an explicit, fixed (never changing) name, or allowing the name to "float" and always get constructed based on the name of the control, parent form, and project name. You could call these two symbol naming styles the "floating" and "fixed" symbol naming modes. The idea behind the "Set lisp symbol names" and "Reset lisp symbol names" commands is to easily toggle between the floating or fixed symbol naming modes. This was important back when floating symbol names were first introduced, because developers were working with both old and new projects, so needed an easy way to toggle modes so that projects remained consistent. These days, it's unusual for developers to still use the fixed symbol names, so the commands are no longer as useful.

I don't think it's possible currently to programmatically extract the embedded lisp filename from the odcl project.
Owen Wengerd (Outside The Box) / ManuSoft