vl-filename-directory function 2019 issue

vl-filename-directory function 2019 issue

TomBeauford
Advisor Advisor
891 Views
3 Replies
Message 1 of 4

vl-filename-directory function 2019 issue

TomBeauford
Advisor
Advisor

In previous Civil 3D versions:

(vl-filename-directory (getenv "QnewTemplate"))

returns:
"D:\\Users\\BeaufordT\\appdata\\local\\autodesk\\c3d 2018\\enu\\template"

In Civil 3D 2019:

(vl-filename-directory (getenv "QnewTemplate"))
returns:
"D:\\Users\\BeaufordT/AppData/local/Autodesk/C3D 2019/enu/Template"

and the macro I've used for previous versions to open the Template folder no longer works.

(startapp "explorer" (strcat "/n,/e," (vl-filename-directory (getenv "QnewTemplate"))))

What's going on here?

64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
0 Likes
Accepted solutions (1)
892 Views
3 Replies
Replies (3)
Message 2 of 4

ronjonp
Mentor
Mentor

I cannot replicate that in C3D 2019 .. do you have all service packs installed?

"c:\\users\\me\\appdata\\local\\autodesk\\c3d 2019\\enu\\template"

Message 3 of 4

TomBeauford
Advisor
Advisor
Accepted solution

Nevermind, somehow while updating settings to the new 2019 version some of the slash marks were reversed for QNEW.  Oddly QNEW worked fine it only affected the macro.

64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
0 Likes
Message 4 of 4

Moshe-A
Mentor
Mentor

@TomBeauford hi,

 

copy your custom template file from R2018 to R2019 and the macro will continue to work.

 

moshe

 

0 Likes