NX3/winXp, Macro question
NX3/winXp, Macro question
(OP)
This may be really out there, but I figured I would ask.
I am wondering if I would be able to create a macro that would do the following;
-Get volume of part
-Save volume
-Go into expressions and rename 2 of them
-v for volume
-sa for surface area
-Move the point that volume creates to a layer (usually layer 10)
It's one of your tedious tasks and looking to make this more efficient. Like I said, I am certain it's out there. But maybe some ideas are out there?
I am wondering if I would be able to create a macro that would do the following;
-Get volume of part
-Save volume
-Go into expressions and rename 2 of them
-v for volume
-sa for surface area
-Move the point that volume creates to a layer (usually layer 10)
It's one of your tedious tasks and looking to make this more efficient. Like I said, I am certain it's out there. But maybe some ideas are out there?
Justin Ackley
Designer





RE: NX3/winXp, Macro question
John R. Baker, P.E.
Product 'Evangelist'
NX Design
Siemens PLM Software Inc.
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/
RE: NX3/winXp, Macro question
We put the body measurement into our drawing formats. They are consistently those two values.
I figured my biggest problem would be selecting the solid since it'll be different everytime.
Justin Ackley
Designer
RE: NX3/winXp, Macro question
As for selecting the body, give it a name and select by name.
John R. Baker, P.E.
Product 'Evangelist'
NX Design
Siemens PLM Software Inc.
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/
RE: NX3/winXp, Macro question
If you are going to capture the results as an expression added to a note on the face of the drawing please beware that you may have problems with out of date data upon opening the drawing files later on.
Regards
hudson
RE: NX3/winXp, Macro question
Can you make a macro that renames some expressions? Based on my previous questions, about renaming the measurements (typically p13 to sa and p14 to v).
Justin Ackley
Designer
RE: NX3/winXp, Macro question
Macro's have a range of functions which are very limited. My feeling on this is that renaming will probably be possible and that any macro you create may work on the part it was created with, but for any other part where the expressions differ then it will have trouble selecting the correct expression to rename. I think you can probably test this for yourself.
Now the modern day compliment of macros would be journals which so far as I can see don't have the ability to do "pause for user input". Perhaps by trying a macro the calls a journal or vice-versa you may be able to get a fully workable result. Brief testing didn't yield too much joy for me so don't be surprised if you have to resort to programming solutions to get what you actually want.
For components being those part which contain the solid models the assembly weight management is the way to go, but only if you have an advanced assemblies license.
For assemblies we haven't had as much luck. In the past if we wanted to get a total mass then we have to do pretty much what Justin is suggesting. I wonder if upcoming versions of NX will provide better results.
Best Regards
Hudson
RE: NX3/winXp, Macro question
Journals can effectively have pauses for user input.
If you call a selection dialogue in the journal the user can select anything from the session that's on screen like any normal UG command.
If you wanted a user input box you can call a form up with a text input on the form.
Basically they can be as complex as you like and have as much user interaction as you need.
I'm pretty sure renaming expressions would be supported in journals but may be a UF command and might not be supported from recording a journal.
Mark Benson
Aerodynamic Model Designer
RE: NX3/winXp, Macro question
I guess the simplest way is just to use the p13 and p14.
Justin Ackley
Designer
RE: NX3/winXp, Macro question
You clearly know more about this than I do which is why we're here on the forum. I had a half hearted go at testing this by recording both journals and macros without much luck. I was hoping somebody like yourself could come in with a better idea. If you could possibly point us at a good example of what you're talking about then I'm sure we'd all be grateful.
Best Regards
Hudson