Author Topic: Lisp symbol naming convention  (Read 19983 times)

Emiliano

  • Full Member
  • ***
  • Posts: 155
Re: Lisp symbol naming convention
« Reply #15 on: April 16, 2014, 03:45:20 AM »
I don't understand. The error indicates that you added a \ character to the function name. Are you mistyping \ instead of /? In any case, I recommend to copy/paste from Studio instead of typing.

You are right.
I just tried with a new project and working properly.
However, for some reason in my project I do copy-paste the code from Openstudio, to the lisp file, but the error is issued when loading the lisp file.

roy_043

  • Sr. Member
  • ****
  • Posts: 378
Re: Lisp symbol naming convention
« Reply #16 on: May 21, 2014, 12:09:10 PM »
I have just started a new ODCL project and, to my surprise, I actually like the new naming convention. It makes a lot of sense.

But I do notice a small thing (ODCL 8.0.0.6):
The 'Clipboard Copy' code for events still uses "dcl_MessageBox" instead of "dcl-MessageBox".

owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 3048
    • Outside The Box
Re: Lisp symbol naming convention
« Reply #17 on: May 21, 2014, 12:52:59 PM »
Thanks for the feedback, and good catch on the function name. I've now corrected the function name for the next build.

Kerry

  • Mesozoic Relic
  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 433
  • class keyThumper<T>
Re: Lisp symbol naming convention
« Reply #18 on: November 17, 2014, 11:32:43 PM »
If anyone wants to experiment, I've attached a quick-n-dirty utility to update the symbol and function names in existing odcl projects. I've only done very limited testing with the _MasterDemo sample project. It's not bulletproof. For example, it expects default event handler names in the project, so it will fail to update event handler names if they are no longer default. Load and run UDCL8UPDATE, then select the .odcl files. It will look for and update a .lsp file of the same name, and it will make backups of both files.


Owen,
Thanks for this.
I'm updating about 20 projects for ac2015 ... decided to convert the ODCL event handlers and symbol names as well.
Faultless so far ... a very nice bit of code too.

Regards and Thanks
Kerry
Perfection is not optional.
My other home is TheSwamp

owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 3048
    • Outside The Box
Re: Lisp symbol naming convention
« Reply #19 on: November 18, 2014, 06:59:32 AM »
That's good to hear, Kerry. Thanks for the feedback!

Peter2

  • Sr. Member
  • ****
  • Posts: 473
Re: Lisp symbol naming convention
« Reply #20 on: November 21, 2014, 12:24:52 AM »
... decided to convert the ODCL event handlers and symbol names as well....
Is it correct that these values are not changed by the lisp and have to be modified manually?
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 3048
    • Outside The Box
Re: Lisp symbol naming convention
« Reply #21 on: November 21, 2014, 07:11:54 AM »
... decided to convert the ODCL event handlers and symbol names as well....
Is it correct that these values are not changed by the lisp and have to be modified manually?

No, the lisp attempts to modify everything -- but only if the original event names are the default forms.

Peter2

  • Sr. Member
  • ****
  • Posts: 473
Re: Lisp symbol naming convention
« Reply #22 on: November 23, 2014, 11:39:49 AM »
...but only if the original event names are the default forms.
OK - that's the trick.

Thanks - the lisp works fine  :)
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

Peter2

  • Sr. Member
  • ****
  • Posts: 473
Re: Lisp symbol naming convention
« Reply #23 on: May 15, 2015, 07:42:08 AM »
After a long time I tried the lisp again ...

- I had a code in Version 7 (lsp and ODCL)
- I renamed both lsp and odcl filenames
- in Studio, I used the "Reset symbolnames.." and "reset events". I modified from
Code: (autolisp) [Select]
c:xTB_Font_Check_dialog_OptSystemPlot_OnClicked
to
c:xTB_Font_Check/dialog/OptSystemPlot#OnClicked
- in Lisp-code, I also have the old code
Code: (autolisp) [Select]
(defun c:xTB_Font_Check_dialog_OptSystemPlot_OnClicked (intValue /)- now I used the ODCL8Upd.lsp

-> Lisp and ODCL where backed up; both get the current filedate
-> but the content of the Lisp was not modified

Did I modify to much?
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 3048
    • Outside The Box
Re: Lisp symbol naming convention
« Reply #24 on: May 15, 2015, 07:54:43 PM »
Just a guess, but you probably broke it by manually resetting symbol names and event names.

Peter2

  • Sr. Member
  • ****
  • Posts: 473
Re: Lisp symbol naming convention
« Reply #25 on: May 28, 2015, 02:38:30 PM »
Finally I could not find why it was broken, but I restored my bak-files and the tool made its job without problems. Thanks.
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10