Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Inventor Project File (.ipt)

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
tkoch
402 Views, 3 Replies

Inventor Project File (.ipt)

Hi all,

 

Is there a way to manage the Projects through the API?

 

Thanks,

 

Ted

3 REPLIES 3
Message 2 of 4
santoshr0114
in reply to: tkoch

Hi Ted,

 

Yes you can manage Project file using DesignProject Object. But it depends on what exactly you want to do?

Regards
Santosh
Message 3 of 4
santoshr0114
in reply to: tkoch

Hi ted,

If the reply answers you query mark the topic as answered accept the answer.
This will help other new/returning users to find the solutions easily

Regards
Santosh
Message 4 of 4
rschader
in reply to: tkoch

My problem has always been that I have so many project files (several hundred) that Inventor is extremely slow when I go to switch projects from the open dialog. What I have finally done is write my own macro for switching projects, and it is much faster, but I have one caveat with it. Once I use this macro to switch projects, when I go to the open menu, the file directory is still in the previous project workgroup directory, and I have to click on the Workgroup folder under Workgroup Search paths in order to make the correct directory active. Not sure what I can add to my macro to make it switch the workgroup directory also?

 

Here is the code I am currently using (I also have another subroutine that uses BrowseFolders to get the project path and pass it to this function:

 

Public Sub SetActiveProject(FullProjectPath As String)
    ' from Inventor samples, but modified to be called with project path string to activate.
    ' Check to make sure a document isn't open.
    If ThisApplication.Documents.Count > 0 Then
        MsgBox "All documents must be closed before changing the project."
        Exit Sub
    End If

    ' Set a reference to the DesignProjectManager object.
    Dim oDesignProjectMgr As DesignProjectManager
    Set oDesignProjectMgr = ThisApplication.DesignProjectManager

    ' Show the current project.
    Debug.Print "Old active project: " & oDesignProjectMgr.ActiveDesignProject.FullFilename

    ' Get the project to activate
    ' This assumes that "C:\Temp\MyProject.ipj" exists.
    Dim oProject As DesignProject
    Set oProject = oDesignProjectMgr.DesignProjects.ItemByName(FullProjectPath)

    ' Activate the project
    oProject.Activate

    ' Show the current project after making the project change.
    Debug.Print "New active project: " & oDesignProjectMgr.ActiveDesignProject.FullFilename
End Sub

 Anyone have any tips how I can tell Inventor to look at the new workgroup path afterwards when I goto the Open dialog box?

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

Post to forums  

Autodesk Design & Make Report