TheSwamp

Code Red => Visual DCL Programming => AutoLISP (Vanilla / Visual) => OpenDCL => Topic started by: viva on May 02, 2007, 07:32:28 AM

Title: OpenDCL
Post by: viva on May 02, 2007, 07:32:28 AM
hi everybody,
           i had designed one project in openDcl and written coding in autolisp. while running the lisp, an error is occuring i.e Object dcl could not opened. i kept the odc files and lisp file in the same folder. i had used this coding as shown below.
(Odcl_LoadProject "images")

the version of OpenDCL is 4.0 and iam using autocad map 2004.

can anyone help me solve this problem

regards
viva
Title: Re: OpenDCL
Post by: Kerry on May 02, 2007, 07:44:17 AM
[recorded message]

Post the ODC and LSP file.

[/recorded message]
Title: Re: OpenDCL
Post by: Kerry on May 02, 2007, 07:45:45 AM
Is the ARX loaded .. which one .. ?

Are the LSP and ODC in a folder on the ACAD search path. ?

EXACTLY what is the error message you get ?
Title: Re: OpenDCL
Post by: Kerry on May 02, 2007, 07:49:28 AM
What does this return ?
(findfile "Images.ODC")
Title: Re: OpenDCL
Post by: jbuzbee on May 02, 2007, 09:00:12 AM
Kerry, now I know why your a "king gator": 3 posts to complete one thought!!  :-o :wink:
Title: Re: OpenDCL
Post by: Kerry on May 02, 2007, 09:08:17 AM
Hi James,

I'm usually not that verbose ... the pills are kicking in I think ..

Murphys law says someone will have to ask sooner or later, just getting in sooner I s'pose :-)
Title: Re: OpenDCL
Post by: viva on May 03, 2007, 03:18:59 AM
yeah , lsp and odc are in the search path only. but it shows the error as

" OBJECTDCL COULD NOT ABLE TO FOUND"

iam thinking that the problem is related to objectdcl.arx. how can i find the suitable objectdcl to opendcl 4.0

iam using

Autocad map 2004
opendcl 4.0
objectdcl2004.arx
can u help me to solve


regards
viva
Title: Re: OpenDCL
Post by: jonesy on May 03, 2007, 03:26:15 AM
Hi viva

I think you may get more targeted help if  you post the 2 files Kerry Brown has asked for. :-)

Tracey
Title: Re: OpenDCL
Post by: viva on May 03, 2007, 03:50:44 AM
i have attached the lsp and odc file.plz give me solution 2 achieve the target

regards
viva
Title: Re: OpenDCL
Post by: jonesy on May 03, 2007, 03:54:18 AM
I'm no programmer, but now the members that can program have something to look at, they will be able to help you sort it out.

Tracey
Title: Re: OpenDCL
Post by: Kerry on May 03, 2007, 04:42:37 AM
viva,

first try these, and post the results ...

(findfile "Images.ODC")

(FINDFILE "OpenDCL_ARXLoader.LSP")

(FINDFILE "OpenDCL.16.arx")

(ODCL_GETVERSIONEX)


Then, change this
(Odcl_LoadProject "images_QC")
to
(Odcl_LoadProject "images")
.... which is the actual NAME of your ODC file
Title: Re: OpenDCL
Post by: Kerry on May 03, 2007, 04:56:58 AM
Next,

Your File is named Images
your form is named Form1
your button is named TextButton5

Each control is addressed by its name ...
so the Form address is Images_Form1
and the button address is Images_Form1_TextButton5
See the Picture :--

Title: Re: OpenDCL
Post by: Kerry on May 03, 2007, 05:06:12 AM
... so the project is loaded with :

(ODCL_LOADPROJECT "images")


the form is displayed with :-

(ODCL_FORM_SHOW images_Form1)


The button is enabled with
(Odcl_Control_SetEnabled images_Form1_TextButton5 T)

So the Code becomes :
Code: [Select]
(DEFUN c:Images1_QC ()

   ;;(ODCL_LOADPROJECT "images" T)
   
   (ODCL_LOADPROJECT "images")
   (ODCL_FORM_SHOW images_Form1)

   (Odcl_Control_SetEnabled images_Form1_TextButton5 T)
   (princ)
)

... and this is the dialog loaded ..

Title: Re: OpenDCL
Post by: Kerry on May 03, 2007, 05:13:03 AM
.... and it would help if you take the time to answer questions, because they ARE important to help solve your problem.
Title: Re: OpenDCL
Post by: Kerry on May 03, 2007, 05:30:46 AM
yeah , lsp and odc are in the search path only. but it shows the error as

" OBJECTDCL COULD NOT ABLE TO FOUND"

i am thinking that the problem is related to objectdcl.arx.

You also appear to be mixing OpenDCL and ObjectDCL


..
opendcl 4.0
objectdcl2004.arx ...

objectdcl2004.arx <<<<<<<< The ARX for AC2004 is OpenDCL.16.ARX

If you add something like this to the top of your file, the correct ARX will be loaded.
Note that  OpenDCL_ARXLoader.LSP must be found on the CAD search path.

... only needs to be run once per session.
ADDED: or the .ARX file can be loaded manually or at Startup ..

Code: [Select]
;; Ensure the OpenDCL.##.ARX is loaded.
(OR (VL-SYMBOL-VALUE 'ODCL_GETVERSIONEX)
    (AND (SETQ tmpfn (FINDFILE "OpenDCL_ARXLoader.LSP"))
         (LOAD tmpfn (STRCAT "Failed to load :- " tmpfn))
    )
    (ALERT (STRCAT "Failed to load OpenDCL_ARXLoader.LSP"))
    (EXIT)
)

(PROMPT (STRCAT "\n CommandLine : < YOUR COMMAND NAME>  [Build 20070503 kwb] "
                "ODCL.Ver:"
                (ODCL_GETVERSIONEX)
                " \n"
        )
)


......
can u help me to solve

regards
viva

Yes. :-)
Title: Re: OpenDCL
Post by: Kerry on May 03, 2007, 06:32:59 AM


I have noticed that there are a couple of sites around that offer downloads of ObjectDCL in various forms .. even one in the Netherlands using the 3Day name ... quite amusing (NOT).






Title: Re: OpenDCL
Post by: Kerry on May 03, 2007, 06:34:16 AM

OK James, I'm done talking to myself for the night. :-)
Title: Re: OpenDCL
Post by: viva on May 04, 2007, 04:19:02 AM
hi kerry,
          thanks a lot. urs information helped me alot.just iam doing that

regards
viva
Title: Re: OpenDCL
Post by: jbuzbee on May 04, 2007, 12:53:23 PM
Kerry - don't apologize!! Your endless rantings have proved to be an invaluble resource to the openDCL community!! Seriously.  Thanks for taking the time to be so detailed.  :wink: