Hi:
I would like to get de "Support File Search Path" and "Working Support File Search Path" from Option in menu "Tools".
With VBA the name of dictionay was `DWGPROPS' and I used
Const DICTIONARY_NAME = "DWGPROPS"
Set DwgInfo = ThisDrawing.Dictionaries(DICTIONARY_NAME)
DwgInfo.GetXRecordData DataType, Data
but with .NET the dictionary name isnĀ“t "DWGPROPS"
thanks
Solved! Go to Solution.
Solved by Alexander.Rivilis. Go to Solution.
ApplicationServices.Application.AcadApplication.Preferences.files.SupportPath
same for all the other "options"..
ApplicationServices.Application.AcadApplication.Preferences.files.____________
Another way is:
string support_path = Application.GetSystemVariable("ACADPREFIX") as string;
ŠŃŠ“ŠæŠ¾Š²ŃŠ“Ń ŠŗŠ¾ŃŠøŃŠ½Š°? ŠŠ»ŃŠŗŠ½ŃŃŃ Š½Š° "ŠŠŠŠŠŠŠŠŠŠ£" ŃŃŠ¼ ŠæŠ¾Š²ŃŠ“Š¾Š¼Š»ŠµŠ½Š½ŃŠ¼! | Do you find the posts helpful? "LIKE" these posts!
ŠŠ°Ń
Š¾Š“ŠøŃŠµ ŃŠ¾Š¾Š±ŃŠµŠ½ŠøŃ ŠæŠ¾Š»ŠµŠ·Š½ŃŠ¼Šø? ŠŠ¾ŃŃŠ°Š²ŃŃŠµ "ŠŠ ŠŠŠŠ¢Š”ŠÆ" ŃŃŠøŠ¼ ŃŠ¾Š¾Š±ŃŠµŠ½ŠøŃŠ¼!
ŠŠ° Š²Š°ŃŠµ Š·Š°ŠæŠøŃŠ°Š½Š½Ń Š²ŃŠ“ŠæŠ¾Š²ŃŠ»Šø? ŠŠ°ŃŠøŃŠ½ŃŃŃ ŠŗŠ½Š¾ŠæŠŗŃ "ŠŠ ŠŠŠŠÆŠ¢Š Š ŠŠØŠŠŠŠÆ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
ŠŠ° Š²Š°Ń Š²Š¾ŠæŃŠ¾Ń ŃŃŠæŠµŃŠ½Š¾ Š¾ŃŠ²ŠµŃŠøŠ»Šø? ŠŠ°Š¶Š¼ŠøŃŠµ ŠŗŠ½Š¾ŠæŠŗŃ "Š£Š¢ŠŠŠ ŠŠŠ¢Š¬ Š ŠŠØŠŠŠŠ"
Alexander Rivilis / ŠŠ»ŠµŠŗŃŠ°Š½Š“Ń Š ŠøŠ²ŠøŠ»ŠøŃ / ŠŠ»ŠµŠŗŃŠ°Š½Š“Ń Š ŃŠ²ŃŠ»ŃŃ
Programmer & Teacher & Helper / ŠŃŠ¾Š³ŃŠ°Š¼Š¼ŠøŃŃ - Š£ŃŠøŃŠµŠ»Ń - ŠŠ¾Š¼Š¾ŃŠ½ŠøŠŗ / ŠŃŠ¾Š³ŃŠ°Š¼ŃŃŃ - Š²ŃŠøŃŠµŠ»Ń - ŠæŠ¾Š¼ŃŃŠ½ŠøŠŗ
Facebook | Twitter | LinkedIn
ACADPREFIX
Is there a way to edit this programatically? ie add some file support paths?
Not all file paths in the "Options->Files" dialog box have a corresponding system variables. If the ones you need to reach as corresponding system variables, such as "automatic save location", then using system variable "SAVEFILEPATH", as @gphanauer suggested, would be easy and simple. For others, you can reach them by
Application.Preferences, which is an AcadObject (COM API object).
So the code would be like:
dynamic preferences = Autodesk.AutoCAD.ApplicationServices.Application.Preferences;
var autoSavePath = (string)preferences.Files.AutoSavePath;
var supportPath = (string)preferences.Files.SupportPath; // paths separated with ";"
var teplatePath = (string)preferences.Files.TemplateDwgPath.
... ...
Norman Yuan
You need to better explain what you want to do.
Are you using a listbox on windows forms? Exactly what do you want to add?
It is best to post the code.