×
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

Macro Dialogu Box

Macro Dialogu Box

Macro Dialogu Box

(OP)
Hi Guys,

I'm trying to create a Macro to simplify importing of DXF files.

When I record the macro, it records the EXACT file that I initially imported... but I want the macro to allow the user to select a different file.

IS THIS POSSIBLE?
Any ideas in how to allow this if it is possible?

I believe it has something to do with the "FILE_BOX" attribute in the Macro code, but have had no success with playing with the values after searching the UG help files.

The complete coding is as follows (the "FILE_BOX" attribute is about half way down the coding):

------------------------------------------------------
Unigraphics NX 2.0.2.2
Macro File: L:\USERS\jamesaw\JOBS\DIGITAL TEMPLATES\DXF_Import.macro
Macro Version 7.20
Macro List Language and Codeset: english 17
Created by jamesaw on Thu Jun 09 08:14:36 2005
Part Name Display Style: $FILENAME
Selection Parameters 1 2 0.230382 1
Display Parameters 1.000000 12.552288 7.847103 -1.000000 -0.625153 1.000000 0.625153
*****************
RESET
MENU, 0, UG_FILE_IMPORT_DXF UG_GATEWAY_MAIN_MENUBAR !
ASK_ITEM  3 (1 RADI 0) = 0  ! Work Part
DIALOG_BEGIN "Import DXF/DWG" 0
 BEG_ITEM  3 (1 RADI 0) = 0  ! Work Part
 END_ITEM  3 (1 RADI 0) = 0  ! Work Part
DIALOG_END 0, 1 ! Import DXF/DWG: Choose DXF/DWG File
FOCUS CHANGE IN 1
FOCUS CHANGE IN 1
FOCUS CHANGE OUT 1
FOCUS CHANGE IN 1
FILE_BOX -2, L:\USERS\jamesaw\JOBS\DIGITAL TEMPLATES\Ascent Knee Primary\179314.dxf  L:\USERS\jamesaw\JOBS\DIGITAL TEMPLATES\Ascent Knee Primary\*.DXF  0 ! DXF/DWG File Name
ASK_ITEM  3 (1 RADI 0) = 0  ! Work Part
DIALOG_BEGIN "Import DXF/DWG" 0
 BEG_ITEM  3 (1 RADI 0) = 0  ! Work Part
 END_ITEM  3 (1 RADI 0) = 0  ! Work Part
DIALOG_END -2, 0 ! Import DXF/DWG: OK
FOCUS CHANGE IN 1
FOCUS CHANGE IN 1
MESSAGE_BOX -2, Drawings cannot be imported to the work part.
MESSAGE_TEXT  Import to a new part if drawings are desired.
MESSAGE_TEXT  
MESSAGE_TEXT  Choose OK to continue the translation without importing any drawings.
MESSAGE_TEXT  Choose Cancel to cancel the translation.
FOCUS CHANGE IN 1
MESSAGE_BOX -2, Import translation job submitted.
FOCUS CHANGE OUT 1
FOCUS CHANGE OUT 1
FOCUS CHANGE IN 1
FOCUS CHANGE IN 1
MESSAGE_BOX -2, Metric-English units conflict, automatically scaling part
MENU, 0, UG_FILE_SAVE_PART UG_GATEWAY_MAIN_MENUBAR !
--------------------------------------------------------

Hope you can help.

Many thanks,

Andy.

---------------------
Design Draughtsman
Biomet Ltd
www.biomet.co.uk

RE: Macro Dialogu Box

Jamziee,

When you are creating your macro and you get to a point that you want the user to input something (what file to open). you can use the "User Entry" or "User Entry With Instroctions" at the point that you want them to pic something.  The comand is under Tools -> Macro.

Jeremy

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