What's new

Exporting part as STEP AP 242

Hello everyone

I am trying to export a simple 3D part into the STEP AP 242 format. I've tried looking at the docs and was not able to find the correct export type.
Additionally, the Part Exporter sample script does not have the option for that format.
1698998008914.png
Does anybody know if that is even possible right now?

Thanks for the help
 

Ex Machina

Senior Member
If you go to File-->Export--> Step File the normal windows explorer window will pop-up and you'll be able to save as those 3 step files. Is this what you wanted or where you looking for something else?
 

NateLiquidGravity

Alibre Super User
I'm assuming you intend to write a script. I'm away from pc, but I see that there are 3 export step options in the AlibreX API. ExportAP203 and ExportAP214 are explicitly listed but there is another generically named ExportSTEP. I will not get a chance to test what spec it exports until this weekend. If it does create a Step 242 file I can wrap that for using in Alibre Script. Unless someone beats me to it.
 
If you go to File-->Export--> Step File the normal windows explorer window will pop-up and you'll be able to save as those 3 step files. Is this what you wanted or where you looking for something else?
Thanks for the response, but I was looking for a way to create the step file inside a script.


I'm assuming you intend to write a script. I'm away from pc, but I see that there are 3 export step options in the AlibreX API. ExportAP203 and ExportAP214 are explicitly listed but there is another generically named ExportSTEP. I will not get a chance to test what spec it exports until this weekend. If it does create a Step 242 file I can wrap that for using in Alibre Script. Unless someone beats me to it.
Thanks for the tip.
I've gone ahead and tried to call this method in the Alibre X API, but I got following error:
System.Runtime.InteropServices.COMException: "This method is obsolete and no more supported"

The ExportAP203 and ExportAP214 methods work fine, but the ExportSTEP doesn't. Maybe I am doing something wrong?

My code snippet looks like this:

C#:
private void btn_export_Click(object sender, EventArgs e)
{
    IADDesignSession session = (IADDesignSession)CurrentSession;

    session.ExportSTEP(@"C:\Users\daniel\Downloads\exportedFile.stp");
}
Inside the CurrentSession is the current IADSession instance saved.
 
ExportSTEP() is deprecated, you should use the ExportAP203/214 methods instead.
Thanks for the tip!

I am well aware that I can export parts in the STEP AP 203/214 format, but my script should also be able to export the current part in the STEP AP 242 format.
As I have mentioned before, I have not found any documentation that was able to help me with my problem. Maybe I wasn't looking hard enough?
 

bolsover

Senior Member
So, first AP242 was in the software but not the API. Now it's in the API, but not the documentation?

AlibreX API documentation is at version 1.0.0.0 (28.0.0.28031) whereas the program as a whole is Version: V28 64-bit [Build 28094].

It is not the first time a distribution has shipped with version numbers out of sync.

It's my guess that the docs are automatically generated and AP242 export was a late addition.

The Alibre script API seems unchanged from V27.
 
Top