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!

NX JOURNAL - UTD POSSIBLE? 1

Status
Not open for further replies.

Kenja824

Automotive
Nov 5, 2014
949
We have a UTD file that created a pop-up with multiple buttons to run other macros (pic attached). I tried to record new macros for NX11 but they wont run correctly on others computers. Cowski had posted code for me that took the place of the macros but I find I cannot get the UTD to run the journals.

Is it possible to have a UTD file run journals? Below is the code for the UTD file. I had tried changing the paths to the journal files but as it is, it tries to make them macros by adding a ".macro" to the end of them. I also tried to change the TYPE from MACRO to JOURNAL, but that gave an immediate error saying it expected either MACRO, GRIP, UFUN or USRT.




TITLE Modeling_DC_TOOLS! This will appear in the banner
VERSION 1
OPTION DISMISS OFF

ICONS ! You may have more than one icon palette
LABEL DC_Tools
COLUMNS 3

NAME NC BLOCK BLANK 20mm SERIES (ANL215-218)
BITMAP $HMS_UG_TOOLS\Tooling\bitmaps\nc_blank_ANL.bmp
TYPE MACRO
ACTION $HMS_UG_TOOLS\Tooling\macro\nc_blank_master.macro

! List Box Section
LIST ! This specifies a list box component
LABEL MACRO ! This is the label at the top of the list box
SIZE 7 ! This specifies the number of lines visible in
! the list box

NAME ANL215 20mm x 54mm x 60mm TAP 2 Dwls
TYPE MACRO
ACTION $HMS_UG_TOOLS\Tooling\Journals\nc_blank_anl215.vb

NAME ANL217 20mm x 54mm x 60mm CLR 2 Dwls
TYPE MACRO
ACTION $HMS_UG_TOOLS\Tooling\Journals\nc_blank_anl217.vb

NAME ANL225 20mm x 54mm x 100mm TAP 2 Dwls
TYPE MACRO
ACTION $HMS_UG_TOOLS\Tooling\Journals\nc_blank_anl225.vb

NAME ANL227 20mm x 54mm x 100mm CLR 2 Dwls
TYPE MACRO
ACTION $HMS_UG_TOOLS\Tooling\Journals\nc_blank_anl227.vb

NAME ANL211 20mm x 64mm x 60mm 2 TAP 2 Dwls
TYPE MACRO
ACTION $HMS_UG_TOOLS\Tooling\Journals\nc_blank_anl211.vb

NAME ANL311 20mm x 64mm x 100mm 2 TAP 2 Dwls
TYPE MACRO
ACTION $HMS_UG_TOOLS\Tooling\Journals\nc_blank_anl311.vb

NAME ANL221 20mm x 69mm x 60mm 2 CLR 2 Dwls
TYPE MACRO
ACTION $HMS_UG_TOOLS\Tooling\Journals\nc_blank_anl221.vb

NAME ANL411 20mm x 69mm x 100mm 2 CLR 2 Dwls
TYPE MACRO
ACTION $HMS_UG_TOOLS\Tooling\Journals\nc_blank_anl411.vb
 
 http://files.engineering.com/getfile.aspx?folder=33a9552c-1a5f-4982-b57d-a3aa6db658a4&file=anl.JPG
Replies continue below

Recommended for you

UTD , the "User Tools" definition , is a very old function, - you can spot that by that "journaling" wasn't implemented in NX yet.
( Probably didn't exist )
User Tools are still there though.
Maybe it might work if you state UFUN instead ?

the syntax however is very similar to toolbars and menufiles, I would suggest you copy paste the content over to a newer format.

see
Regards
Tomas
 
Hey Tomas

Unless I am misunderstanding this, the problem with this is that I still need to create a pop-up that has a bunch of buttons in it, that runs journals. In the bottom half of the image I attached above, each line of attributes is a different button that runs a journal. Quite often a guy will know he needs a specific ANL# or ANI# component, but also there are often times when they know they have detail that is a certain length and using specific hole pattern but doesnt know which block it is, so they will read the info on the buttons and choose the right one.

I was looking at the idea of just making a TBR file for this and have all of the attribute buttons in a drop down, but it looks to me that the bitmaps need to be square in shape. Which makes it difficult to place so much info. So it seems I need to create a pop-up like whats in the image that will have all of the buttons.

The UTD files were easy to understand how they worked and I could just open one up and see what to do no problem. Doing the same thing with VB code however is an entirely new animal for me. I struggle with the basic stuff for VB at best. That code just doesnt seem to stick to my brain. lol Thats why I was just hoping for a miracle cure of a way to make a utd file call a journal, because someone already gave me code for a journal that adds the attributes.
 
no. Now you misunderstood me.
What i am trying to say is , convert the "User Tools" dialog to a more modern "Toolbar" or "Tab" , then you can start any type of "automation", since toolbars and tabs supports Journals.
the "User Tools -thing", was introduced way back in Unigraphics10.4 , - 1995 (!), and it has not evolved much since then. instead have other customization tools been introduced.
(
The thread i linked to above contains a link to a guide of customizing the UI.



Regards
Tomas
 
Hi Kenja824,

The advice that Tomas offers is good - UTD has not been improved as NX gains new functionality - using Ribbon bar customization is a better long term solution.

A possible interim strategy would be using a macro with UTD to launch the VB journal.

HTH, Joe
 
First I want to thankyou all for being patient with me. I have never had a problem learning anything I put my mind to in the past. Until I found VB code. I just dont understand why it wont sink in. lol Even though I struggle badly with it, I still like it a lot more than macro as it is much easier to manipulate and understand what it is doing when reading it. If I could learn VB well enough I would have every macro off our system.

Unfortunately I am struggling so I am having to be a headache to others as I do. So I do appreciate all the help and ask you to continue to be patient.

Jpetach -- I actually have tried that just to get things running for everyone while I dig into code for it. Unfortunately something about macros in NX11 is killing me. I will record a macro to do something and I will get the buttons working again. Then the next day they dont work anymore. Several times I have had macros stop working for everyone the next day. ..... The problem with using a macro to start a journal I believe, is as the macro is recording, and I run the journal, the macro continues to record. I cant stop it until the journal stops or pauses. The Journals have a point that they pause for the user to select a body, so I tried using that point to stop the macro from recording further. Then I select the body and hit OK and let the journal continue. It will work for me, but nobody else. Then it wont work for me the next day.

Toost -- Sorry for being slow with this. I am constantly being pulled in different directions and it makes it hard for me to really focus on one problem. From what I am gathering is that I could add these in a drop-down menu in a toolbar. Reading that PDF in the one link I see something about a pop-style to a drop down. Not sure if that means there is actually a pop-up window that I can add buttons to or not. I will play with it and see.

One question I have is in TBR files and such, I understand how to have bitmaps attach to journals. I am not sure how to (if I can) get that to show in the form of button and text together. Then I could use the drop down menu, and have the text list all of the attributes because the buttons are square and dont give enough room to list the attributes for each one.
 
OMG I think I may have just figured it out..... stand by. lol
 
Ok, so this is making sense to me now for the most part. lol I do have a question though. Once I have a drop-down menu for all the options made, is there some way in the VB file that I can tell it to use text only instead of an image? Right now the only way I know to do this is to make the change to each button through customize and right click on the button and so on. It would be much easier if I can call for it to use this style automatically so I dont have to go to every designers computer to change every button. lol

For instance, a drop down menu looks like this... (very small example)

BEGIN_DROPDOWN In Process Appended Text
COLUMN_DROPDOWN 5

BUTTON DRAFTING NOTES NEW!
LABEL Start
BITMAP R:\hms_tools\NX11\Tooling\bitmaps\new_start1.bmp
ACTION R:\hms_tools\NX11\Tooling\macro\new_annotation.macro

BUTTON DRAFTING NOTES EXISTING!
LABEL Start
BITMAP R:\hms_tools\NX11\Tooling\bitmaps\new_start2.bmp
ACTION R:\hms_tools\NX11\Tooling\macro\existing_annotation.macro

END_DROPDOWN2


How do I change the BITMAP to use Text instead?
 
Looks like I got it.... All I needed to do was add DROPDOWN_STYLE AS_POPUP_MENU below the Begin DropDown line.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor