.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Template Folder Path

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
SRSDS
403 Views, 2 Replies

Template Folder Path

Is there a way to access the templates folder path?

C:\Users\USER\AppData\Local\Autodesk\AutoCAD 2018\R22.0\enu\Template\acadiso.dwt

2 REPLIES 2
Message 2 of 3
_gile
in reply to: SRSDS

Hi,

You have to use the Preferences COM object (see this topic).

To avoid referncing the COM libraries, you can use late binding with dynamic type (C#) or Object (VB).

C#

dynamic preferences = Application.Preferences;
string templatePath = preferences.Files.TemplateDWGPath;

 VB

Dim preferences As Object = Application.Preferences
Dim templatePath As String = preferences.Files.TemplateDWGPath


Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 3
SRSDS
in reply to: SRSDS

Thank you. 🙂 One of these day's I'm going to commit to switching. The translating is starting to get annoying.

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

Post to forums  

Forma Design Contest


AutoCAD Beta