×
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

Journal (.NET) Remove Parameters Command

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,

Mark Benson
Aerodynamic Model Designer

RE: Journal (.NET) Remove Parameters Command

do you want to remove parameter of attribut???

RE: Journal (.NET) Remove Parameters Command

Sample NXOpen .NET Visual Basic program to remove parameters from all bodies in work part

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

do you have an idea how to extract parts of the string?

for example:

part_name =  "xxx_name"

part_number = extract(part_name,"_")

???

RE: Journal (.NET) Remove Parameters Command

(OP)
Tonie,

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

(OP)
vitulakk,


-----------------------------------------
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

If you want to remove parameters, would exporting a parasolid work?

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

Do a Transform/Copy and move it 0 (Zero) distance.  Then delete the original body.  You will now have an unparameterized version of the original model.

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

As always, everything is in, but either difficult to get the key word to search for or not f*****g supported !

That's the price to pay for a product sponsored by share-holders. The sooner the better ...

RE: Journal (.NET) Remove Parameters Command

Tonie,

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

Quite difficult, indeed, but I'm working on it !
winky smile

RE: Journal (.NET) Remove Parameters Command

the problem is, that it comes back with part_name.length does not exist

RE: Journal (.NET) Remove Parameters Command

(OP)
Vitulaaak,

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

that sounds better clown

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