.NET

Reply
Member
schaudha
Posts: 4
Registered: ‎03-27-2013
Message 1 of 6 (386 Views)

Export IGES via the .NET API

386 Views, 5 Replies
03-27-2013 11:37 PM

Hello,

 

Can anyone tell me how do I export the current AutoCAD session to an IGES file from the .NET API?

 

The closest I came was running the IGESEXPORT command from the SendStringToExecute() function of the Document object. However, it still is not fully automated, since it always asks a file name to export to, something I cannot pass through the command itself.

 

SC

 

 

 

Valued Mentor
DiningPhilosopher
Posts: 370
Registered: ‎05-06-2012
Message 2 of 6 (363 Views)

Re: Export IGES via the .NET API

03-28-2013 03:39 AM in reply to: schaudha

IGES export is done by a separate executable, which is in the AutoCAD program files folder, with the name Aruba.exe.

 

You may be able to use it directly on drawing files that aren't open in AutoCAD, like so:

 

Aruba.exe -i <input.dwg> -o <output.igs>

 Within AutoCAD the IGESEXPORT command prompts for objects, and then simply WBLOCK's the selected objects to a DWG file in your temp folder, which it then hands off to Aruba.exe.

 

What I don't know, is whether the WBLOCK'ed file has been fiddled with in any way, or filtered to remove anything in the selection that is either non-exportable, or for some other reason, not included.

Moderator
Alexander.Rivilis
Posts: 1,406
Registered: ‎04-09-2008
Message 3 of 6 (354 Views)

Re: Export IGES via the .NET API

03-28-2013 03:58 AM in reply to: DiningPhilosopher

DiningPhilosopher wrote:

...You may be able to use it directly on drawing files that aren't open in AutoCAD, like so:

 

Aruba.exe -i <input.dwg> -o <output.igs>

Hi, Tony! It is look like impossible to start Aruba.exe (from directory of AutoCAD 2013) as a standalone application because of:

D:\Program Files\Autodesk\AutoCAD 2013>aruba.exe -i test.dwg -o test.igs
aruba.exe: failed to get valid license.

But if Aruba.exe from directory of AutoCAD 2012 work without license error.


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

Valued Mentor
DiningPhilosopher
Posts: 370
Registered: ‎05-06-2012
Message 4 of 6 (344 Views)

Re: Export IGES via the .NET API

03-28-2013 04:25 AM in reply to: Alexander.Rivilis

Hi Alex. I never tried it on 2013, but just did now and you're right. 

 

The OP can try creating a simple console application called aruba.exe, and temporarily replace the original aruba.exe in the AutoCAD folder with the console app, and see what command line it gets when IGESEXPORT starts it.  

 

It looks like Autodesk has decided to make it difficult-to-impossible to batch-export to IGES, which of course, is a real shocker.  I guess AutoCAD's price tag doesn't justify something like that.

Member
schaudha
Posts: 4
Registered: ‎03-27-2013
Message 5 of 6 (299 Views)

Re: Export IGES via the .NET API

04-01-2013 03:07 AM in reply to: schaudha

Done as per DiningPhilosopher's suggestion:

 

The 2013 aruba.exe takes a number of parameters. I could run this from the command line and export an IGES. Please fill in the product key, license type and the applicable paths and/or the other arguments as appropriate in your case:

 

aruba.exe -productKey <product key> -productVersion 2013.0.0.F -productLicenseType <product license type> -productResourcePath "C:\Program Files\Autodesk\AutoCAD 2013\AdlmRes\en-US" -productLicenseLocale en_US -i C:\Drawings\sample.dwg -o C:\Drawings\sample.igs

Valued Mentor
DiningPhilosopher
Posts: 370
Registered: ‎05-06-2012
Message 6 of 6 (279 Views)

Re: Export IGES via the .NET API

04-02-2013 04:48 AM in reply to: schaudha

Well, good to see you got it working.

 

Batch exporting to other file formats always seems to be hindered by something or other.

 

Maybe it's just a big coincidence 8)

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

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