×
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

Variable Radius Macro

Variable Radius Macro

Variable Radius Macro

(OP)
Hi Guys,
I'm working in 7.0 (7.5 as soon as I find the time to install). I have a part that needs lots of individual blended radii that are variable. I can do them one at a time but it's going to take a long time and is quite tedious. This seems like a place for a macro. Before I reinvent the wheel, has anyone created something like this? I'ld like to be able to pick an edge and have NX automatically put X size radius at one end and Y size radius at the other end. This is a fairly common operation for the types of parts we make.
Thanks,
  JohnK

RE: Variable Radius Macro

I think the best general approach is to record a journal, and then generalize it so that you can pick any edge. I don't have the code to do it, but that's the general idea. You'll need somebody with some experience in the .net API, or download a sample from GTAC that does something similar.

For example, in the journal you recored you will find commands like these to set the variable radius points:

Dim vrIndex1 As Integer
vrIndex1 = edgeBlendBuilder1.AddVariableRadiusDataNew(edge1, "86.0213654142479", "15", nullPoint, False, False)

Dim vrIndex2 As Integer
vrIndex2 = edgeBlendBuilder1.AddVariableRadiusDataNew(edge1, "33.9512213112124", "7", nullPoint, False, False)

Dim vrIndex3 As Integer
vrIndex3 = edgeBlendBuilder1.AddVariableRadiusDataNew(edge1, "100", "10", nullPoint, False, False)

Dim vrIndex4 As Integer
vrIndex4 = edgeBlendBuilder1.AddVariableRadiusDataNew(edge1, "0", "10", nullPoint, False, False)

 

Mark Rief
Product Manager
Siemens PLM

RE: Variable Radius Macro

(OP)
Mark,
I've done a little work in .NET on occasion and I see a few examples on this site that should help. Do you know where I can find some documentation on the functions and procedures that NX has built-in? I looked on GTAC but I don't see anything. I can see where the journal capabilities can be really helpful.
Thanks,
  JohnK

RE: Variable Radius Macro

Help --> NX Help
Automation --> NX Open --> Open for .NET

 

Mark Rief
Product Manager
Siemens PLM

RE: Variable Radius Macro

(OP)
I got this to work the way I wanted. Journals and .Net are very cool. The only thing that I'd like to improve is the time it takes to start. When I click on the custom command button I created, it takes maybe 10 secs to start. NX says "working". Once the first Input box comes up it's very quick. It seems like maybe it's interpreting the code each time. Is there a way to compile the journal file for a faster start? This is really minor as the operation is excellent after the initial wait.
Thanks,
  John

RE: Variable Radius Macro

Yes.  Once a journal has been created, you can use something like Visual Basic to 'convert' it into an actual executable program, but that will require an NX Open development license.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/

To an Engineer, the glass is twice as big as it needs to be.
 

RE: Variable Radius Macro

(OP)
I can't really justify the license for just a few seconds. Just knowing the reason makes me feel better. It's interesting though, the first time I run it takes about 7 sec on my machine, but subsequent runs only take about 2 sec. Maybe it caches it. Anyway, thanks for the help, it's a great feature.
John

RE: Variable Radius Macro

What happens is that the first time you run it, as you suspected, it's running it through the interpreter.  But once that's done it's almost as if you had done a build and that is what gets 'cached', this 'executable' version of the journal, which will remain available until you exit the session.  We do that same thing with dialogs.  You can see this with something like the 'Hole Feature' where a lot of data is needed to first establish the dialog and all the settings.  But subsequent selections of the function are a bit quicker.  In some cases we actually save the cache for later use even in another session.  The best example of that is the 'Command Finder' where the first time you open this dialog after installing a version of NX, it can take 20 or 30 seconds, maybe longer (it has to create an index of all the function names used in NX before it can do it's first 'find').

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/

To an Engineer, the glass is twice as big as it needs to be.
 

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