Author Topic: Want to Learn OpenDCL  (Read 8815 times)

0 Members and 1 Guest are viewing this topic.

GDF

  • Water Moccasin
  • Posts: 2081
Want to Learn OpenDCL
« on: July 09, 2008, 02:23:14 PM »
James

Gary, would you like to learn OpenDCL?  Would you like me to convert this or maybe a simpler project (easier for you to follow) to an OpenDCL form?

Just let me know - I'll be glad to help ...

Yes, thanks. Here is a simple routine to start off with. I have thrown in more code than necessary. Not enough time now to sift through it.
Command name is WEB

    Place the following files in your AutoCAD Support File Search Path:
        ARCH_WEB.vlx compiled routine   
        ARCH_WEB.arch editable text file
        ARCH_WEB.lisp editable text file
        ARCH_WEB.misc editable text file


Thanks again James

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Want to Learn OpenDCL
« Reply #1 on: July 09, 2008, 02:43:37 PM »
Well let me have a look . . .
James Buzbee
Windows 8

GDF

  • Water Moccasin
  • Posts: 2081
Re: Want to Learn OpenDCL
« Reply #2 on: July 09, 2008, 02:47:47 PM »
Well let me have a look . . .

James

If not the one I posted, any simple routine will do.

Thanks
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

JohnK

  • Administrator
  • Seagull
  • Posts: 10637
Re: Want to Learn OpenDCL
« Reply #3 on: July 09, 2008, 04:15:27 PM »
Why dont we start off with a Hello world application?

A hello world app that that will report env vars or something?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Want to Learn OpenDCL
« Reply #4 on: July 09, 2008, 04:23:57 PM »
Ok, check this out -

This is the only file needed (ARCH_OPENDCL.lsp) besides the OpenDCL.arx and the URL list files. 

In the zip file there are three files:
ARCH.odcl - this is the file the openDCL editor uses to create and edit forms and controls.  Use the OpenDCL editor on the file.
ARCH.lsp - this file is generated by the OpenDCL editor to create a compiled version of the ARCH.odcl file.  This is read directly into AutoCAD.  The contents of the file are copied into the ARCH_OPENDCL file and loaded when the rest of the lisp is loaded.

ARCH_OPENDCL.lspp is the AutoLISP file that runs the whole show. Let me know if this easy enough to follow . . .

James Buzbee
Windows 8

GDF

  • Water Moccasin
  • Posts: 2081
Re: Want to Learn OpenDCL
« Reply #5 on: July 09, 2008, 04:47:27 PM »
James

Command: web
; error: no function definition: DCL_HIDEERRORMSGBOX

DCL_PROJECT_IMPORT
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Want to Learn OpenDCL
« Reply #6 on: July 09, 2008, 05:02:27 PM »
Sorry - did you download the OpenDCL.arx and put it in AutoCAD's search path?

I'll attach it here . . . what version of UatoCAD are you using?
James Buzbee
Windows 8

GDF

  • Water Moccasin
  • Posts: 2081
Re: Want to Learn OpenDCL
« Reply #7 on: July 09, 2008, 05:10:22 PM »
Sorry - did you download the OpenDCL.arx and put it in AutoCAD's search path?

I'll attach it here . . . what version of UatoCAD are you using?

Yes, I'm using OpenDCL17.arx and it is loaded. I'm using 2008 on windows xp

Command: web
; error: no function definition: DCL_PROJECT_IMPORT
Command:
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Want to Learn OpenDCL
« Reply #8 on: July 09, 2008, 05:27:00 PM »
Sorry Gary - it's working here.

When you type in (arx) are you sure OpenDCL.17.arx is in the list??
James Buzbee
Windows 8

GDF

  • Water Moccasin
  • Posts: 2081
Re: Want to Learn OpenDCL
« Reply #9 on: July 09, 2008, 05:33:48 PM »
Sorry Gary - it's working here.

When you type in (arx) are you sure OpenDCL.17.arx is in the list??

YEP, it's showing up

I am missing the sub routines called out in your lisp file.

(dcl_hideerrormsgbox)
(dcl_project_import...
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Want to Learn OpenDCL
« Reply #10 on: July 09, 2008, 05:41:32 PM »
That's wiered - they're defined in the OpenDCL.arx.  Any function named "dcl_" is defined in that arx.
James Buzbee
Windows 8

GDF

  • Water Moccasin
  • Posts: 2081
Re: Want to Learn OpenDCL
« Reply #11 on: July 09, 2008, 05:49:46 PM »
I even used your copy of the arx file, and it is loaded. Double check it with appload and (arx)
It's there.
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Want to Learn OpenDCL
« Reply #12 on: July 09, 2008, 08:35:32 PM »
This is why a rarely post stuff . . . sorry.

I guess this will be the last.
James Buzbee
Windows 8

JohnK

  • Administrator
  • Seagull
  • Posts: 10637
Re: Want to Learn OpenDCL
« Reply #13 on: July 10, 2008, 08:29:16 AM »
This is why a rarely post stuff . . . sorry.

I guess this will be the last.
Why wouldn't you post anything anymore? ...I dont understand; you dont like posting cause it didnt work right away? I cant tell you how many apps ive posted that didnt work (maybe a half a thousand).
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Want to Learn OpenDCL
« Reply #14 on: July 10, 2008, 09:05:07 AM »
Yea, programming is such an exact science. One little character out of place & whamo!
It can be very frustrating at times.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

GDF

  • Water Moccasin
  • Posts: 2081
Re: Want to Learn OpenDCL
« Reply #15 on: July 10, 2008, 10:20:50 AM »
This is why a rarely post stuff . . . sorry.

I guess this will be the last.

James

Thanks for trying. It is always hard to understand code from others. I'm sure it is something simple. Maybe you can explain why the arx file can be loaded and the arx's subroutines fail to load. I really do want to learn opendcl and update my older dcl routines.

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

GDF

  • Water Moccasin
  • Posts: 2081
Re: Want to Learn OpenDCL
« Reply #16 on: July 10, 2008, 10:37:55 AM »
James

I retried again this morning and got this message. Now I'm really confused.

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

GDF

  • Water Moccasin
  • Posts: 2081
Re: Want to Learn OpenDCL
« Reply #17 on: July 10, 2008, 10:45:44 AM »
James

Since I have opendcl installed, I went to the examples within the opendcl/examples folder.
I forgot I had this.

I tried ListBoxCopyPast.lsp and ListBoxCopyPast.odc routine and it works fine.

I think some of the problem is my lack of understanding of arx type files.

Here is the arx file that I have originally.

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

FengK

  • Guest
Re: Want to Learn OpenDCL
« Reply #18 on: July 10, 2008, 12:58:32 PM »
To help with the debugging, I tried the zip file that Jame's posted (ARCH.ZIP). It works here. I'm using AutoCAD 2008 and the latest version (5.0.0.19) of OpenDCL.

There is one missing function: KB:SAVEFORMSIZE.

Gary, maybe you can post the link of this thread at http://www.opendcl.com. I don't how often Owen visits this site. There are also other OpenDCL users on that site that may not be a member here.


FengK

  • Guest
Re: Want to Learn OpenDCL
« Reply #19 on: July 10, 2008, 01:00:56 PM »
James

I retried again this morning and got this message. Now I'm really confused.

Gary

Just shooting in the dark, are you using English version AutoCAD? Did you download the English version OpenDCL?
http://downloads.sourceforge.net/opendcl/OpenDCL.Runtime.ENU.5.0.0.19.msi?modtime=1214193808&big_mirror=0

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Want to Learn OpenDCL
« Reply #20 on: July 10, 2008, 02:23:12 PM »
You need the Language Module in the same folder as OpenDCL.a7.arx

Here's the English Module - just copy the folder into the same folder as the arx file.

Kelie - thanks for taking a look.  Here's the save Form size sub:

Code: [Select]
(defun kb:SaveFormSize(formname wd ht / )
(vl-registry-write
 (strcat"HKEY_CURRENT_USER\\Software\\kbTools2009\\" formname)
 "w"
 wd
  )
  (vl-registry-write
 (strcat"HKEY_CURRENT_USER\\Software\\kbTools2009\\" formname)
 "h"
 ht
  )
  (princ)
)

I know OpenDCL savees it's own information, but I need to know the Size of a form before it's Rolled-up.
James Buzbee
Windows 8

GDF

  • Water Moccasin
  • Posts: 2081
Re: Want to Learn OpenDCL
« Reply #21 on: July 10, 2008, 03:19:21 PM »
Ok, I reinstalled opendcl studio, and ran the runtime installer also.

Restarted autocad.

Ran your routine.

Still get the same error message.
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

Spike Wilbury

  • Guest
Re: Want to Learn OpenDCL
« Reply #22 on: July 10, 2008, 03:23:35 PM »
Ok, I reinstalled opendcl studio, and ran the runtime installer also.

Restarted autocad.

Ran your routine.

Still get the same error message.

Hola Gary,

Do you have (if they have to be like that) all the opendcl files in the support search path of autocad? - I recall that was needed back on the early objectdcl (chad) days....

Maybe...

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Want to Learn OpenDCL
« Reply #23 on: July 10, 2008, 03:39:07 PM »
Gary - are you running this on a clean instance of AutoCAD?  Meaning there are ne other customizations loaded?  I noticed in the lisp files you sent me you don't localize your variables - there may be something confilcting between my routine and some of yours.  Just a thought.
James Buzbee
Windows 8

GDF

  • Water Moccasin
  • Posts: 2081
Re: Want to Learn OpenDCL
« Reply #24 on: July 10, 2008, 03:57:28 PM »
Gary - are you running this on a clean instance of AutoCAD?  Meaning there are ne other customizations loaded?  I noticed in the lisp files you sent me you don't localize your variables - there may be something confilcting between my routine and some of yours.  Just a thought.

Luis

Everything is in the support path.

James

Running plain autocad 2008

Never had this much trouble with doslib or other arx files or installing dll files with a bat file like:
RegSvr32 v:\arch\support\AxAcadStatusBarButton.dll


I had opendcl installed over a year ago and never played with it, but it was up and running, I could run their examples ok.
I reinstalled the newer version today and rebooted and tried one of the new sample routines.
Now I get this error "The OpenDCL runtime module failed to load...."

I'm at a loss.

This is one reason I have been shy of opendcl or objectdcl programs...

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

GDF

  • Water Moccasin
  • Posts: 2081
Re: Want to Learn OpenDCL
« Reply #25 on: July 17, 2008, 05:14:21 PM »
James

I don't know why, but I had an old arx file in the mix. After deleting the bad file everytrhing is working. It was in
one of my folders in my Support File Search Paths.

I thought I had checked everything...oh well a new day...better results.

Love you modified web routine. WORKS PERFECTLY. I will try the examples in the OpenDCL Studio and look
into your examples. Thanks for taking the time for us old dclers. I know once I get into this I will have questions...
but baby I'm on board now. woo hoo

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

GDF

  • Water Moccasin
  • Posts: 2081
Re: Want to Learn OpenDCL
« Reply #26 on: July 17, 2008, 05:24:29 PM »
James

Missing this function
KB:GETFORMSIZE

I can't expand the dialog once minimized.

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

GDF

  • Water Moccasin
  • Posts: 2081
Re: Want to Learn OpenDCL
« Reply #27 on: July 18, 2008, 04:13:40 PM »
James

Missing this function
KB:GETFORMSIZE

I can't expand the dialog once minimized.

Gary


Think I found it:

(defun kb:GetFormSize(formname / wd ht)
(setq wd(vl-registry-read
 (strcat"HKEY_CURRENT_USER\\Software\\kbTools2009\\" formname)
 "w"
 
  )
  ht(vl-registry-read
 (strcat"HKEY_CURRENT_USER\\Software\\kbTools2009\\" formname)
 "h"
 
  ))
  (if (not wd)(setq wd 250))
  (if (not ht)(setq ht 400))
  (list wd ht)
)

Patched the function into the routine.

Only problem I have is how do I expand the dialog when it is a thin line?

Gary

Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

GDF

  • Water Moccasin
  • Posts: 2081
Re: Want to Learn OpenDCL
« Reply #28 on: July 22, 2008, 02:03:43 PM »
James

Missing this function
KB:GETFORMSIZE

I can't expand the dialog once minimized.

Gary




This got it to expand:
c:ARCH_00_Tray_OnClicked


Question, why do I have to enter the command opendcl to load the arx file, and not use appload?
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64