Hi I am new to .NET,
I would like to change the: Options --> Tool Palettes File Location to point to a different location.
I know how to do that in vba but i am totaly lost in vb.net.
Thank you in advance,
-J
There is no .NET API to get/set the Support Search Path. However, you can use the COM API to achieve this task. To use the COM API you need to reference these two COM libraries AutoCAD 2008 type Library & AutoCAD/ObjectDBX common 17.0 type library.
The following code snippet should help you:
' COM related imports
Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.Interop.Common
_
Public Sub test2()
Dim acadApp As AcadApplication = Application.AcadApplication
acadApp.Visible = True
Dim acadpref As AcadPreferences = acadApp.Preferences
Dim strCurrentSuppPath As String
strCurrentSuppPath = acadpref.Files.SupportPath
acadpref.Files.SupportPath = strCurrentSuppPath + ";" + "c:\program files\PWGSC-TPSGC Autodesk Resource\Electsym"
End Sub
-Varadan
Thank you very much for your answer Varadan ,
I was hopping that the .NET had a solution so that i can avoid updating my code when AutoDesk decides to stop supporting the COM API. Let's hope never or in the next 5-10 years.
Again, Thank you for your elegant solution Varadan,
-J