Journal (.NET) Remove Parameters Command
Journal (.NET) Remove Parameters Command
(OP)
Folks,
It's a long shot as I can't find any documentation for this in the help docs.
Anyone know of a nx open command to remove parameters in ug.
I've tried recording a journal but this is un-supported.
The only thing I can think of is that they've called it something else in the docs.
Any help would be great.
Cheers,
It's a long shot as I can't find any documentation for this in the help docs.
Anyone know of a nx open command to remove parameters in ug.
I've tried recording a journal but this is un-supported.
The only thing I can think of is that they've called it something else in the docs.
Any help would be great.
Cheers,
Mark Benson
Aerodynamic Model Designer





RE: Journal (.NET) Remove Parameters Command
RE: Journal (.NET) Remove Parameters Command
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.UI
Imports NXOpen.Utilities
Module remove_parameters_from_all_bodies_in_work_part
Dim s As Session = Session.GetSession()
Dim ufs As UFSession = UFSession.GetUFSession()
Sub Main()
Dim workPart As Part = s.Parts.Work
Dim myBodies As NXOpen.BodyCollection = workPart.Bodies
Dim bodytag(0) As NXOpen.Tag
Dim a_body As Body
For Each a_body In myBodies
bodytag(0) = a_body.Tag
ufs.Modl.DeleteObjectParms(bodytag)
Next
End Sub
Public Function GetUnloadOption(ByVal dummy As String) As Integer
GetUnloadOption = UFConstants.UF_UNLOAD_IMMEDIATELY
End Function
End Module
RE: Journal (.NET) Remove Parameters Command
for example:
part_name = "xxx_name"
part_number = extract(part_name,"_")
???
RE: Journal (.NET) Remove Parameters Command
You're a star and you get one for your efforts.
Not quite what I wanted but lead me to this:
UF_MODL_delete_object_parms
Which will work on sheets and curves.
I really hope that one day soon they add the GUI command name to the help for nx open. It would make everyones life so much easier. Search is great but only on the slightest off chance you actually know the random name they've called stuff. Ho hum.
Thank you once again Tonie
Mark Benson
Aerodynamic Model Designer
RE: Journal (.NET) Remove Parameters Command
-----------------------------------------
dim part_name as string = "xxx_name"
dim stringlen as part_name.length()
Dim i As integer= part_name.LastIndexOf("_") ' position of the last "_"
Dim partnumber As String = part_name.Substring(0,stringlen-i
-----------------------------------------------
That should return "xxx" but I've not tested it.
Do a search in google on string.substring to get documentation if you need more info.
It might be a good Idea to copy this question into a new thread so other people can find it in the future.
Mark Benson
Aerodynamic Model Designer
RE: Journal (.NET) Remove Parameters Command
You may be able to make a macro that would export the chosen object(s), delete them from the file, and import the parasolids in to replace them. It probably would not work for curves, but should for sheets and solids.
Disclaimer: I don't have a version of NX with journaling to test on.
RE: Journal (.NET) Remove Parameters Command
John R. Baker, P.E.
Product 'Evangelist'
UGS NX Product Line
SIEMENS PLM Software
Cypress, CA
http://www.siemens.com/ugs
http://www.plmworld.org/museum/
RE: Journal (.NET) Remove Parameters Command
That's the price to pay for a product sponsored by share-holders. The sooner the better ...
RE: Journal (.NET) Remove Parameters Command
Can you not post without including a jab at UGS every time?
Tim Flater
Senior Designer
Enkei America, Inc.
www.enkei.com
Some people are like slinkies....they don't really have a purpose, but they still bring a smile to your face when you push them down the stairs.
RE: Journal (.NET) Remove Parameters Command
RE: Journal (.NET) Remove Parameters Command
RE: Journal (.NET) Remove Parameters Command
Sorry the line "dim stringlen as part_name.length()"
should be
"dim stringlen as integer = part_name.length()"
Mark Benson
Aerodynamic Model Designer
RE: Journal (.NET) Remove Parameters Command