Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't preview DCL in visual lisp editor

25 REPLIES 25
SOLVED
Reply
Message 1 of 26
iwafb
7272 Views, 25 Replies

Can't preview DCL in visual lisp editor

Hi All,

 

I've recently upgraded to Autocad 2012 (x64). All seems fine, except that I haven't been able to use the preview dcl function in the VisualLISP editor on any of the computers that have this system installed. When I try, I get this message:

 

; warning:cannot create tmp file for DCL: "C:/Program Files/Autodesk/AutoCAD 2012 - English/$vld$.dcl"

 

Has anyone else found this? Are there any solutions/workarounds or is this a bug?

 

Thanks in advance.

John

25 REPLIES 25
Message 2 of 26
3wood
in reply to: iwafb

One of the reason is because the folder is read-only or your account are not permitted to make changes to that folder.

 

3wood

CAD KITS

Message 3 of 26
iwafb
in reply to: iwafb

Thanks for your reply.

 

I think you are right in that the folder is read only. I've tried to change this in the properties, but windows is not holding the settings. That is, as soon as I've changed it, I select the folder again and it shows as read only.

 

Also, I've got administrator rights on this computer.

 

Cheers

John

Message 4 of 26
virtually.built
in reply to: iwafb

This problem exists for all Versions of AutoCAD (x64) in Windows 7. So if the problem is because Windows 7 does not allow programs or users to write to that folder, is it possible to get Visual Lisp to save the temporary $vdl$.dcl to a different folder?

Message 5 of 26
3wood
in reply to: virtually.built

You can write a small lisp to preview a dcl file. Forget about the Visual Lisp preview fuction.

 

3wood

CAD KITS

Message 6 of 26
iwafb
in reply to: iwafb

HI All,

 

It's been a while since my post and yes, I'm still unable to preview the dcl's in the visual lisp editor. I have tried to change the folder rights, but no luck, even though I've got full admin rights on my machine. Has anyone had similar problems using windows 7? More to the point, are other users able to preview dcl's without issues?

 

Thanks in advance

John

Message 7 of 26
bgingerich
in reply to: iwafb

I had this same issue.  If I'm remembering right, I had to give the "system" account "full control" or "read, write, and modify" access or something like that.  What's happening is the computer isn't allowing any programs (run under the "System" account) to modify/create files in that folder.

 

(if ("mysolution"=answer) then (click "Accept As Solution"))

─────────────────────────────────────────────────────────────────────────────────────────────
Brandon Gingerich
Message 8 of 26
iwafb
in reply to: iwafb

Thanks for the tip. The system account had full control rights, but for some reason, the users account didn't. I gave this account full control and it all works now...

 

Thanks

John

Message 9 of 26
tcorey
in reply to: iwafb

Hello from the future. This issue is still present and the solution is still good in AutoCAD 2019. Does anyone know how to configure the visual lisp editor so that it doesn't try to write this temporary file to a program directory in the first place? I would be more comfortable pointing this one file to another folder than I am giving a user such high permissions to AutoCAD program files.


Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 10 of 26
saifumk8
in reply to: iwafb
Message 11 of 26
JBerns
in reply to: tcorey

@tcorey

I agree with you, we should not have to violate Windows security measures to preview DCL files.

This could easily be fixed if Autodesk would change the Visual LISP Editor preview tool to use the 'Documents' folder instead of the 'Program Files' folder.

Even better, include a configuration option to select the temporary path.

This is not on the Idea Station that I could find. Is anyone aware of a post where we can vote to get this corrected?

 

Regards,

Jerry

-----------------------------------------------------------------------------------------
CAD Administrator
Using Inventor 2022
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional
Message 12 of 26
tcorey
in reply to: JBerns

Until, and if, Autodesk gives us the ability to change this setting, the most practical answer is to do as @3wood suggested. Make yourself a command that loads and displays the dialog.  

 

 



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 13 of 26
JBerns
in reply to: tcorey

Ackn.

 

-----------------------------------------------------------------------------------------
CAD Administrator
Using Inventor 2022
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional
Message 14 of 26
JBerns
in reply to: tcorey

I may have just discovered a simple solution for previewing DCL files in VLIDE - at least it worked for me in AutoCAD 2019.

The DCL preview command attempts to create a file in the 'Program Files' folder , which is protected.

It uses the same "preview" name each time.

 

Try this:

 

  1. Create a file named $vld$.dcl on your desktop.
  2. Copy the file to C:\Program Files\Autodesk\AutoCAD 2019 (provide necessary permission)
  3. Now in VLIDE, test the DCL preview command.

Since the file already exists, VLIDE can edit the file instead of having to create it. I tested multiple DCL files successfully.

 

I hope this is helpful. Mark as solution if it helps you.

 

Regards,

Jerry

-----------------------------------------------------------------------------------------
CAD Administrator
Using Inventor 2022
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional
Message 15 of 26
john.uhden
in reply to: iwafb

I have used the attached forever.  Perhaps it will help you.

 

John F. Uhden

Message 16 of 26
JBerns
in reply to: john.uhden

@john.uhden,

 

I think the DTEST file you posted is missing a supporting function? When I run DTEST, the following error is issued:

; error: no function definition: @CV_RTRIM

 

I tried it with the simple example, HELLO.DCL, which previews successfully with the built-in viewer.

 

Regards,

Jerry

-----------------------------------------------------------------------------------------
CAD Administrator
Using Inventor 2022
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional
Message 17 of 26
john.uhden
in reply to: JBerns

My apologies.  I posted without having checked what parts were missing.

I think all the parts are included with this one.

 

John F. Uhden

Message 18 of 26

Thanks, your DTEST.LSP works.

 

Since Visual Lisp looks the same as it did when it first came out, I doubt Autodesk has any plans to upgrade it.

Message 19 of 26

I have proved your solution but the "preview DCL" does not function

Thank you

Message 20 of 26

I don't know how accessing to "System" account of Autocad 19.
Can you explain me step by step?
Thanks

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost