Is someone know the command to add the activate drawing to the project ?
My problem is that, I am generating various drawing and I would like to add them to a project, If someone know how to do that, It can help me.
Dim AcadObj As AcadApplication
Dim AcadDoc As AcadDocument
On Error Resume Next
Set AcadObj = GetObject(, "AutoCAD.Application")
If Err.Number <> 0 Then
Set AcadObj = CreateObject("AutoCAD.Application")
NombreDessinAutocad = 2
AcadObj.Visible = True
Set AcadDoc = AcadObj.Application.Documents.Add("C:\PATH\Cartouc
Set AcadUtil = AcadDoc.Utility
Set AcadEspaceObj = AcadDoc.ModelSpace
Set blockRefObj = AcadEspaceObj.InsertBlock(P, "C:\PATH\Mop_V1.1.dwg", 1#, 1#, 1#, 0)
document to the project
Set ...... **Looking for the command to add my drawing to the project**
I could not find any type of command to add a drawing to the project like you are looking for however you could just write some code to add the information to the project.wdp file. Its just a text file so its shouldn't be to difficult. You could also add some other info like Descriptions and Section or Subsection. Its in this format
I use notepad to edit the ".wdp" file when I need to add lots of drawings with section and description information quickly.
You need to close the project before doing this and I always make backups of the file before changing things just in case!
You should search for the VLAX-class that makes it easy for VBA to communicate with LISP, as the AcadE API is solely based on AutoLISP.
Then you should have a look in the help file.
Look for c:ace_add_dwg_to_project
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.
The AutoCAD Electrical forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.
Upgrading to a 2015 product? Make sure to check these out 1st!