Parasolid Export Naming
Parasolid Export Naming
(OP)
I need to export assembly parts and assemblies to a parasolid format for my toolroom, and instead of exporting each part and naming each parasolid, I wanted to export the entire assembly. The issue we are having is that once you re-open the parasolid in NX, it doesn't retain the part names. For that matter, once you open the parts in Master Cam, it does not have part names. Is there any way to have it ratain the part names?
I understand that this is not the best method and we can send .step files or just send the standard NX file, but I was hoping that there was a method to name the dumb solids, possibly some parameter I can fill in? Apparently parasolids are preffered by the guys in our toolroom.
I understand that this is not the best method and we can send .step files or just send the standard NX file, but I was hoping that there was a method to name the dumb solids, possibly some parameter I can fill in? Apparently parasolids are preffered by the guys in our toolroom.





RE: Parasolid Export Naming
There really is not an easy way to rename each parasolid component - but maybe there is a way to to it with "journaling" that I am not aware of.
RE: Parasolid Export Naming
The end of thread561-305870: Naming within parasolid assemblies mentions opening an IR, perhaps you should contact GTAC and add your vote to this one.
www.nxjournaling.com
RE: Parasolid Export Naming
www.nxjournaling.com
RE: Parasolid Export Naming
1 - export assembly outside teamcenter
2 - you will need to define a naming rule "${db_Part_name} which will use the part name instead of the item ID.
3 - Open a standalone version of UG.
4 - read in the exported assembly.
5 - export a STEP file of the assembly.
You will now have a STEP file of the assembly which will retain the part names when you read it into another CAD/CAM package. If that software supports assembly structure.
RE: Parasolid Export Naming
CODE
'
Option Strict Off
Imports System
Imports System.Collections
Imports NXOpen
Imports NXOpen.UF
Module NXJournal
Sub Main
Dim theSession As Session = Session.GetSession()
Dim ufs As UFSession = UFSession.GetUFSession()
Dim workPart As Part = theSession.Parts.Work
Dim displayPart As Part = theSession.Parts.Display
Dim lw As ListingWindow = theSession.ListingWindow
Dim mySelectedObjects() as NXObject
Dim myResponse as Selection.Response
Dim tagList() As NXOpen.Tag
Dim tags as new ArrayList
Dim strParasolid As String
lw.Open
strParasolid = workPart.FullPath
strParasolid = Left(strParasolid, Len(strParasolid) - 4)
strParasolid = strParasolid & ".x_t"
myResponse = SelectObjects(mySelectedObjects)
if (myResponse = Selection.Response.Cancel) OrElse (myResponse = Selection.Response.Back) then
'user canceled selection, exit journal
exit sub
end if
For each obj as Body in mySelectedObjects
if obj.IsOccurrence then
obj.SetName(obj.OwningComponent.DisplayName)
else
obj.SetName(obj.OwningPart.Leaf)
end if
tags.Add(obj.Tag)
Next
tagList = CType(tags.ToArray(GetType(NXOpen.Tag)), NXOpen.Tag())
ufs.Ps.ExportData(tagList, strParasolid)
lw.WriteLine("Output file: " & strParasolid)
lw.Close
End Sub
Function SelectObjects(ByRef selobj() As NXObject) As Selection.Response
Dim theUI As UI = UI.GetUI
Dim prompt as String = "Select Solid Bodies"
Dim title As String = "Selection"
Dim includeFeatures As Boolean = False
Dim keepHighlighted As Boolean = False
Dim selAction As Selection.SelectionAction = _
Selection.SelectionAction.ClearAndEnableSpecific
Dim scope As Selection.SelectionScope = Selection.SelectionScope.AnyInAssembly
Dim selectionMask_array(0) As Selection.MaskTriple
With selectionMask_array(0)
.Type = UFConstants.UF_solid_type
.Subtype = 0
.SolidBodySubtype = UFConstants.UF_UI_SEL_FEATURE_BODY
End With
Dim resp As Selection.Response = theUI.SelectionManager.SelectObjects( _
prompt, title, scope, selAction, _
includeFeatures, keepHighlighted, selectionMask_array, selobj)
Return resp
End Function
End Module
www.nxjournaling.com