×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Parasolid Export Naming

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.

RE: Parasolid Export Naming

You are right in stating that STEP would be a better route to take in this situation.
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

I did a quick search because I know this has come up before (and often it would appear). Unfortunately, I did not find a workable solution other than 'use STEP files'.

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

Quote:

but maybe there is a way to to it with "journaling"
Hmmmmmmm...

www.nxjournaling.com

RE: Parasolid Export Naming

If you are using TC with UG then STEP will name the parts using the item ID or part number. It will not retain the part name. There may be a better way but my current workflow to create a STEP of an assembly and have the part names come over is this.

 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

Here's a quick proof of concept journal I put together; run it, select a few solids from your assembly, then open the parasolid file and see if it gives you something useful. If it does (or if it can be made to do so) I can update it to run through an entire assembly automatically.

CODE

' NX 7.5.0.32
'
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources