Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Write NX feature name as Object Name in Parasolid Export

Status
Not open for further replies.

raavis

Mechanical
Joined
Mar 28, 2014
Messages
2
Location
US
Dear NX experts

I am trying to export a NX ".prt" file as Parasolid for CFD/FEA analysis. The objects do not have any features / parameters associated except for a feature title name like this Body(4) "FluidFlowpath".

I am trying to use a Journal file to get the feature name associated with a body such as "FluidFlowpath" and assign it as body name in Parasolid file.

few code lines from my NX file
-----CODE SNIPPET TO PRINT FEATURE NAME
'--------------
' loop through all bodies in display session
'--------------
For each obj As Body in bdyCol
bdyFeat = featCol.GetAssociatedFeature( obj )
strBodyName = bdyFeat.GetFeatureName.ToString

lw.WriteLine("Object Tag: " & obj.Tag)
lw.WriteLine("Object Type: " & obj.GetType.ToString)
lw.WriteLine("Object Name: " & strBodyName )
Next
---

The output is shown below. I could not get the feature name "Fluidflowpath" with the GetFeatureName command and get only the Body #. What is the command to extract the name "Fluidflowpath" I have associated with the Body.
-----OUTPUT
Object Tag: 27166
Object Type: NXOpen.Body
Object Name: Body(1)
Object Tag: 26889
Object Type: NXOpen.Body
Object Name: Body(2)
Object Tag: 26922
Object Type: NXOpen.Body
Object Name: Body(4)
----

Information about the body
--
Feature status for: FluidFlowpath(4)
Feature is alive

Owning part H:\FinalAnalysisModel.prt
Owning layer 1
Modified Version 201 25 Mar 2014 17:28 (by user )
Created Version 144 05 Mar 2014 15:49 (by user )

------------------------------------------------------------

Feature Parameters for: FluidFlowpath(4)
------------------------------------------------------------
Feature Type - Body(4)

Feature Associativity for: FluidFlowpath(4)
------------------------------------------------------------


============================================================

Thanks
Ravi
 
There are two feature names. One is a system defined name and the other is user defined name. With your line of code strBodyName = bdyFeat.GetFeatureName.ToString you get the system name

With strBodyName = bdyFeat.Name you get the user defined name.

Hope this helps.

Frank Swinkels

 
Thanks a lot Frank. It works

Ravi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top