Hi, the noob again !!!
I found the info below from the Objects Browser but I'm not sure how to use it...
Code:
Public Function SetCurrentProject(ByVal fullPath As String) As Boolean
Membre de Autodesk.Aec.Project.ProjectBaseManager
Résumé :Sets the current project.
Paramètres :fullPath: Inputs the full path of the project.
Valeurs de retour :True if sets successfully, otherwise false.
I try with the code below, but the project seems to not be set current ???
Code:
Imports Autodesk.Aec.Project
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Public Class MyCommands
<CommandMethod("prname")> _
Public Sub prname()
Dim pjtMgr As ProjectBaseManager = ProjectBaseServices.Service.ProjectManager
Dim pjtFileName As ProjectFileName = pjtMgr.CurrentProjectFileName
Application.ShowAlertDialog(pjtFileName.Name)
SetCurrentProject("D:\Autodesk\My Projects\HousePlan\HousePlan.apj")
End Sub
Public Function SetCurrentProject(ByVal fullPath As String) As Boolean
Application.ShowAlertDialog(fullPath)
End Function
End Class
Thanks in advance !