- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
My usecase is this; Im trying to track the selection of things in a fusion file that makes up the exported part that we export to stl for printing or export as another format for other manufacturing processes.
A problem occurs, when the exported file is lost or corrupt, we want the traceability to file the fusion file and the bodies/components that are required to export out a new version of the file.
The current workflow we have for this tracking, introduces allot of human error.
@kandennti has done some great work in his text command threads, but i found the text commands to be unreliable lately, mostly as keys within the returned dictionaries have changed a bit.
One of the ways i have found that gives me the information im after is this:
#get a selection
current_selection = neu_ui.get_selections()
# store selection to disk or database, along with part name & version
# pull part selection from disk or database
neu_ui.set_selections(res)
# export to stl
Segements & SegId's.
The commands above work really well, but where they fall short is when you version a file, the Segment & segIds change, example below:
# v1 of fusion file
[{'occurrence': {'source': {'segId': 49, 'entityId': 3, 'rootId': ''},
'path': [{'segId': 49, 'entityId': 33366, 'rootId': ''},
{'segId': 49, 'entityId': 33096, 'rootId': ''}]},
'entity': {'segId': 49, 'entityId': 27100, 'rootId': ''}, 'type': 'Ns::BREP::BodySelection'}]
# v5 of the fusion file
[{'occurrence': {'source': {'segId': 9, 'entityId': 3, 'rootId': ''},
'path': [{'segId': 9, 'entityId': 33366, 'rootId': ''},
{'segId': 9, 'entityId': 33096, 'rootId': ''}]},
'entity': {'segId': 9, 'entityId': 27100, 'rootId': ''}, 'type': 'Ns::BREP::BodySelection'}]
I realized i can get the file's segment/ SegID with :
neu_server.get_current_segment()
In most of my cases, its only the segId that changes between versions of the file, it would be easy enough to write a method to update this between versions.
The question i have is this the best way right now to do this kind of information tracking?
Are there other methods or workflows that allow us to store this kind of information and use it between versions.
Cheers
kym
Thanks in advance,
Kym
Solved! Go to Solution.