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

Insert WD_M block programmatically

1 REPLY 1
SOLVED
Reply
Message 1 of 2
AdrianSaf
540 Views, 1 Reply

Insert WD_M block programmatically

Hello,

 

I'm new to working with AutoCAD so this might be a really silly question.

 

How can I programmatically add the electrical WD_M block using ObjectARX and the COM API?

 

I assume I can read the WD_M dwg and then insert each block from it to my dwg. Is that the way to go?

 

Does the API offer the complete path to the WD_M dwg? How can I tell from what folder I should get the WD_M from (JIC1/JIC125)?

 

Thank you.

1 REPLY 1
Message 2 of 2
AdrianSaf
in reply to: AdrianSaf

 

Found a way to do it by calling the LISP ACADE api.

 

 

ResultBuffer resBuf = new ResultBuffer();
resBuf.Add(new TypedValue((int)LispDataType.Text, /*MSG0*/"c:ace_GBL_wd_m")); //Lisp function to call
resBuf.Add(new TypedValue((int)LispDataType.Int16, 1)); // options
ResultBuffer res = Application.Invoke(resBuf);

 

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