Setting the DCL ID

Setting the DCL ID

mgorecki
Collaborator Collaborator
917 Views
10 Replies
Message 1 of 11

Setting the DCL ID

mgorecki
Collaborator
Collaborator

I am currently using 2 lines to set the DCL ID.  One line points to the local folder and I use it when testing.  The other just uses the DCL filename and is used when creating the .VLX.

;(setq dcl_id (load_dialog "C:\\MyPrograms\\MyLspFolder\\MyLsp.dcl")) ;use when testing
 (setq dcl_id (load_dialog "MyLsp.dcl")) ;use when creating a VLX

The code and DCL are located on my local drive, but the .VLX is located on the network.  That's why I use two different lines.  I comment one out when testing or creating the .VLX.

I'm sure there a better way to do this.  Is it as simple as setting trusted locations?  

 

 

0 Likes
Accepted solutions (1)
918 Views
10 Replies
Replies (10)
Message 2 of 11

paullimapa
Mentor
Mentor
Accepted solution

AutoCAD needs to know where your MyLsp.dcl is located.

Your code currently does not show this. Only way that this works is if your MyLsp.dcl is located in one of the folders defined in your AutoCAD Options> Files> Support File Search Path


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 11

mgorecki
Collaborator
Collaborator

Yeah, that's what I was thinking.  It only knows (when testing) because I gave it the entire path.  So, for every project that has DCL's, I would need to supply that path to the Support File Search Path.

0 Likes
Message 4 of 11

paullimapa
Mentor
Mentor

Or just include in your lisp to write the dcl code on the fly to temp folder then your lisp code will design that as the path to load the dcl. Then when lisp code completes also include function to delete the generated dcl


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 5 of 11

mgorecki
Collaborator
Collaborator

Yes, I've done that before for more simple DCL files, but some of these are pretty complex.  Plus, I like to view the DCL as I'm creating it with Tools > Interface Tools > Preview DCL in Editor so I can make it look "just right". 😊

Thank you for your input, I just set the path and tried it, and it worked just fine.

0 Likes
Message 6 of 11

paullimapa
Mentor
Mentor

glad to have helped...cheers!!!


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 7 of 11

Sea-Haven
Mentor
Mentor

Try this great program by RLX. Writes dcl to lsp.

 

0 Likes
Message 8 of 11

-didier-
Advisor
Advisor

Bonjour @mgorecki 

 

When you create the VLX, you can include the DCL in the "application".

The there in just ONE file vlx who contains the lsp AND the DCL.

Then the second line is enough.

Have you tried ?

 

Amicalement

Éternel débutant.. my site for learning : Programmer dans AutoCAD

DA

EESignature

0 Likes
Message 9 of 11

mgorecki
Collaborator
Collaborator

Hello Didier,

Thanks for your thoughts.  All of my programs are made into VLX, the problem was testing.  I would use the first line while testing, then when I was ready to create the VLX, I would comment that out and use the second line.

But now I add the current work folder into my "Support File Search Path", so I only have to use the second line.

0 Likes
Message 10 of 11

mgorecki
Collaborator
Collaborator

Hi Sea-Haven,

Wow, I'll have to study that one.  Thank you for sending that to me.

How, exactly, does one use it?  

0 Likes
Message 11 of 11

paullimapa
Mentor
Mentor

we all have our favorites to convert dcl to lsp like this similar one attached


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes