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

Changing Palettes File Location

2 REPLIES 2
Reply
Message 1 of 3
junoj
314 Views, 2 Replies

Changing Palettes File Location

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

2 REPLIES 2
Message 2 of 3
varadak
in reply to: junoj

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

Message 3 of 3
junoj
in reply to: varadak

Thank you very much for your answer Varadan Smiley Happy,

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

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost