to bring a .dwg file & place it in origin in autocad usig c#
i have a library which contains some .dwg files. my task is to fetch a specific dwg and put it in the origin of the autocad and then i have to fetch another one and place it above the first component. so please help to solve this

Vinay SinghPosted Aug 18, 2016, 12:39 AM
Maen BadwanPosted Aug 25, 2016, 10:20 AM
I am asking this because to my knowledge .NET doesn't natively support load/Save DWG or any AutoCAD formats.
Note that I didn't try this by myself, but I found the following links that discuss similar requirement to yours:
http://stackoverflow.com/questions/26868288/inserting-a-preexisting-autocad-drawing-into-a-current-drawing
http://docs.autodesk.com/ACD/2014/ENU/index.html?url=files/GUID-2656E245-6EAA-41A3-ABE9-742868182821.htm,topicNumber=d30e720423
Another alternative is to use a commercial SDK. LEADTOOLS is able to load DWG files as can be seen in this post:
http://support.leadtools.com/SupportPortal/CS/forums/29003/ShowPost.aspx
You can save the result to DXF format using LEADTOOLS SDK, and then convert the resultant DXF to DWG using AutoCAD. More details can be found here:
http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/index.html?url=WS1a9193826455f5ffa23ce210c4a30acaf-5b15.htm,topicNumber=d0e153769
Disclaimer: I am employee of the LEADTOOLS product