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.