Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Journalling (VB.Net) - Running a Macro in a journal

Status
Not open for further replies.

MSPBenson

Mechanical
Jan 13, 2005
190
Can you run a macro in a journal and if so what is the command?
Alternatively to not use the macro does anyone know how to edit current features in a journal. It seems straight forward to create new geometry but editing it doesn't seem to be supported.

Thanks in advance,



Mark Benson
Aerodynamic Model Designer
 
Replies continue below

Recommended for you

Mark,

I know this seems a little obvious, but here goes....
Have you tried creating a macro and running it while recording a journal? If that doesn't work then I usually assume the worst.

Please let us know how you fare.

Best Regards

Hudson
 
Hudson,

Tried that to start off with. Unfortunately it's never that easy.
This however doesn't mean you cant do it via journalling.
I've created many programs now that won't record as journals but the commands are in the NXopen suite.
The biggest problem most of the time is what they name the commands and where they are in the help files. The logic in the naming could defiantely be better.

Thanks


Mark Benson
Aerodynamic Model Designer
 
Yes Mark,

I've seen your posts, you've picked up quite few programming skills in the process.

The problem with macros is that they have to be re-created for each new version of NX when you upgrade. If possible you might consider scripting in VB the whole task.

Best regards

Hudson
 
David,

NX4

As I mentioned in my original post I need to edit features in a part rather than create them from scratch.
I have a seed part with all of the features in place (around 120 features).
I then want to substitute some surfaces in a wavelink at the begining of the part to update the model.
This then requires the update of around 4 other features. Generally re-defining edge strings of the new surface.
The macro has been very easy to record and very easy to update. Even if I add or remove features.
I know alot of people are nervous of macros as some people have issues from user to user. This is normally caused by using icons when recording the macro rather than using the menu drop downs. The latter (as long as all menus are on) are usually the same from user to user and less likely to be modified.

I have also got this working with a UDF however it requires more re-referencing of geometry than the macro. I end up needing to re-select the same geometry 5 times. Far from "slick".



Mark Benson
Aerodynamic Model Designer
 
Is the re-defining edges consistently the same ones? What if you where to name those edges in the UDF, and have the Journal file select those edges by name to do the selection. Not sure if that is the problem. If you can do it with Macro, there should not be an issue with journal.

Re-defining edge strings, Maybe this is a NX5 feature I'm referencing but they have an associative edge selection. But if your are completely replacing the surface, probably won't work.

When you create a Journal what exact issues do you have?

-Dave Tolsma
Tolsnet LLC
 
David,

As mentioned in all of my posts so far.
I need to know the command syntax (if it exists) to edit features in a journal (vb.net)
As mentioned earlier I have tried recording an edit of the feature in a journal but this is not supported in NX4.
Therefore I must manually write the code. Hence my problem.
I've looked in the nxopen help but without knowing what the command might be called I'm struggling to find anything.


Mark Benson
Aerodynamic Model Designer
 
If the journal does not record the edit, then you will not find it in NX/Open. They are one of the same. It will be in UG/Open but you'll need to compile your application to use this functionality.

Coverage of Journal is not complete in NX4 or NX5 for that matter. Sounds like you will need to stick with Macro's until your on a version of NX that covers the functionality you need. Or Create a UG/Open application or Knowledge Fusion application.

-Dave Tolsma
Tolsnet LLC
 
I feel like I'm going round in circles on this one.
I know for a fact you can do things in Nxopen that you can't record as a journal and you don't need to compile these to get these to run. The NxOpen help has thousands upon thousands of commands. However not knowing the naming convention makes it like looking for a needle in a haystack.
Any help on this would be great.
Thanks.


Mark Benson
Aerodynamic Model Designer
 
just to be clear, there is NX/Open and UG/Open. Two completely different sets of API's. NX/Open is written at the core with a language that will map to a corresponding Java, .Net, VB, and C++. Journaling is based on this same functionality. When a feature is covered it will be available to all platforms equally. Now your stating that the interface does not record the edit, then either it is not covered yet in NX/Open or there is some other mapping for the NX/Open api to the interface that is not working correctly.



-Dave Tolsma
Tolsnet LLC
 
David,

Thanks for your responses. I'm not sure if you understand what I'm doing.

As an example try recording plotting in NX4 or below (not sure if they've got round to including it in later versions)
The recorded journal will not do anything as the plot command cannot be recorded. You can see in the journal that it will have headers for the actions but no code under them.
I have a program I have written myself in vb.net using nxopen commands that can plot drawings. Specifically using nxopen.uf commands.
So as I mentioned before, I know for fact you can do things in Nxopen that you can't record in a journal.

My question still stands. Is editing features available in NXopen?








Mark Benson
Aerodynamic Model Designer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor