Active Contributor
Posts: 29
Registered: ‎09-24-2012
Message 1 of 2 (125 Views)

Add drawings to active project

125 Views, 1 Replies
12-04-2013 01:22 AM

Hello everyone,


I encounter a problem that I do not understand. I created a little C# routine for Autocad Electrical (2011 and 2012) which adds some drawings to the current project with the following command:


(c:ace_add_dwg_to_project  dwg2add  paramlst)


This mehtod works perfectly. With the parameter list you can set the Section, Sub-Section and Descriptions of the page properties, exactly what I want.


When I start the routine, I check which project is active. If the wrong project is active, I activate the appropiate project with the following command:


(c:wd_makeproj_current  wdpfnam)


So, when I want to add drawings to project A and project B is active at the start of the routine, I activate project A and the drawings are added.


The problem:

When I want to add drawings to project A and this project is already active, the drawings are not added to the project. The method mentioned above to add drawings returns nill, which means a failure.


Why is this happening? Is this a bug of Autocad?


I already tried to always activate the project I want to add drawings to, but that doensn't matter.


Can anyone help me with this problem?


Thanks in advance.

ADN Support Specialist
Posts: 210
Registered: ‎08-25-2004
Message 2 of 2 (89 Views)

Re: Add drawings to active project

12-06-2013 09:37 AM in reply to: 110000474593



I see this same issue is being discussed on this post. .






Wayne Brill
Developer Technical Services
Autodesk Developer Network

Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.