STEP export with custom coordinate system as origin in WEB.Link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
STEP export with custom coordinate system as origin in WEB.Link
We are having the same issue: We want to export all of Creo's assembly parts as individual *stp files with a specific coordinate system, with a specific name that is not the "default". We are looking for a way to do it with a mapkey after opening the assembly. Do you know if this could be possible? if so, can you point us to the right direction?
Reference topic: https://community.ptc.com/t5/Customization/STEP-export-with-custom-coordinate-system-as-origin-in-WEB-Link/m-p/993730
- Labels:
-
General
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I did look into doing it with a mapkey, but I'm not sure it's going to be very easy to do that. The mapkey, to my knowledge, can't query the model and change it's behaviour based on the contents of the model. It just blindly follows a bunch of menu clicks and key presses.
I made it all work using the Java Object Toolkit (previously called jlink), but that's not for the faint of heart. It's quite difficult to get that working, especially if you don't already know Java programming. We did previously use web.link, which is a javascript program that runs inside the built in web browser.
To do what you're after, the general process is something like:
1. Set the output directory (I used the working directory)
2. Create a simplified rep and suppress all but the first part (this ensures that all parts are using the same origin csys)
3. Find part filename of the unsuppressed part. Export to STEP with that name.
4. Delete simplified rep
5. Loop back to 2 but leave part 2 unsuppressed instead of part 1
6. Repeat until all parts are exported
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello Chris
A previous created and saved Profile can be loaded with ExportProfileLoad.
There is a method mentioned to setup the csys: SetCsysName in CoordSysExport... and SetInt3DCsys.
This a a bit poor, but I guess you can specify the csys name in the export model.
Tcl Working Code to get an idea. This will export the active assembly with a specified csys and two different STEP API's
The exported data for ps_export.asm here:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This is good info, thank you. I created my tool in OTK Java Free (jlink) in the end, which did everything I needed. This will be valuable info for others though, I'm sure.
With regard to exporting parts with a different csys as the origin. I have found that to be quite unreliable, even when doing it manually through the UI, so I'd encourage anyone doing this in future to test that it works as expected in your use case before committing to it as a process.
BR,
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @Chris_Johnson , we had similar issues by using a different csys. In my point of view, the template is most of the time the root cause of issues. I think for the orientation (x_angle and y_angle), all planes and their names, and so on, should dependent on the default csys, if created as a first feature. If this is the case the world csys system should fit on export, if you have an interchange with other CAD systems.
BR
Ralf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @IT_7493813,
I wanted to see if you got the help you needed.
If so, please mark the appropriate reply as the Accepted Solution or please feel free to detail in a reply what has helped you and mark it as the Accepted Solution. It will help other members who may have the same question.
Please note that industry experts also review the replies and may eventually accept one of them as solution on your behalf.
Of course, if you have more to share on your issue, please pursue the conversation.
Thanks,
PTC Community Moderator
