Community
PowerMill Forum
Welcome to Autodesk’s PowerMill Forums. Share your knowledge, ask questions, and explore popular PowerMill topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Types of UI in macros

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
jsweatherbie
438 Views, 4 Replies

Types of UI in macros

Hello . I’m trying to make a simple marco but all I know is the yes/no prompt and the drop down menu prompt  . I wasn’t sure if there were different menus I can use than the 2. 

Tags (1)
Labels (1)
4 REPLIES 4
Message 2 of 5
Sean570
in reply to: jsweatherbie

There is also "INPUT" which allows users to type something in a small textbox. as well as having users select multiple entities that exist in the explorer tree.  But that's about it. They are used like this:

STRING userInput = INPUT "Enter Tool Name."

Entity LIST tps = {}
$tps = INPUT ENTITY MULTIPLE toolpath "Select toolpaths you want to use"

  

Message 3 of 5

Hi @jsweatherbie,

 

There are a few options:

Yes/No box

INT $Err = 0

$Err = QUERY "Is selection correct?"

 

Text entry box

STRING $UserInputText = ""

$UserInputText = INPUT “Text to display to the user.”

 

Selection box

INT $Err = 0

$Err = INPUT CHOICE <string list> “Text to display to the user.”

 

Entity Selection box

ENTITY $Ent = INPUT ENTITY <ENTITY TYPE> “Text to display to the user.”

 

Entity selection, allowing you to select multiple entities

ENTITY LIST $Ents={}

$Ents = INPUT ENTITY MULTIPLE <ENTITY TYPE> “Text to display to the user.”

 

You can also use MACRO PAUSE to allow the user to interact directly with elements of the PowerMill interface, you can then resume the macro by clicking the button on the form, you can add instructions to the macro pause form using:

MACRO PAUSE "Instructions go here"

 

Hope that helps

 

Richard



Richard Pedley
Research Engineer
Message 4 of 5

Thanks this helps more then ever
Message 5 of 5
jsweatherbie
in reply to: jsweatherbie

//SHOWS YOU A LIST OF DRILLS

string list options={"0.531 GOLD","0.551 GOLD","0.656 GOLD","0.689 GOLD","0.812 GOLD","0.875 GOLD"}
int i = INPUT CHOICE $options "Choose your GOLD Drill?"

if $I == 0 {

FORM FEATURESELECT
MACRO PAUSE "SELECT A HOLE" + crlf

 

//531 GOLD DRILL

IMPORT TEMPLATE ENTITY TOOLPATH TMPLTSELECTORGUI "C:/Users/User/AppData/Local/Autodesk/PowerMill/My-Strategies/GOLD-DRILLS/531-G-DRILL.ptf"

RENAME TOOLPATH "1" ".531-G-DRILL"
EDIT TOOLPATH ".531-G-DRILL" CALCULATE
FORM ACCEPT SFDrilling

}
if $I == 1 {

//551 GOLD DRILL ( NEVER-USED )

 

}
if $I == 2 {

FORM FEATURESELECT
MACRO PAUSE "SELECT A HOLE" + crlf +"AND PRESS RESUME"

//656 GOLD DRILL

IMPORT TEMPLATE ENTITY TOOLPATH TMPLTSELECTORGUI "C:/Users/User/AppData/Local/Autodesk/PowerMill/My-Strategies/GOLD-DRILLS/656-G-DRILL.ptf"

RENAME TOOLPATH "1" ".656-G-DRILL"
EDIT TOOLPATH ".656-G-DRILL" CALCULATE
FORM ACCEPT SFDrilling

}
if $I == 3 {

//689 GOLD DRILL (NEVER-USED)


}
if $I == 4 {

FORM FEATURESELECT
MACRO PAUSE "SELECT A HOLE" + crlf +"AND PRESS RESUME"

//812 GOLD DRILL

IMPORT TEMPLATE ENTITY TOOLPATH TMPLTSELECTORGUI "C:/Users/User/AppData/Local/Autodesk/PowerMill/My-Strategies/GOLD-DRILLS/812-G-DRILL.ptf"

RENAME TOOLPATH "1" ".812-G-DRILL"
EDIT TOOLPATH ".812-G-DRILL" CALCULATE
FORM ACCEPT SFDrilling

}
if $I == 5 {

FORM FEATURESELECT
MACRO PAUSE "SELECT A HOLE" + crlf +"AND PRESS RESUME"

//875 GOLD DRILL

IMPORT TEMPLATE ENTITY TOOLPATH TMPLTSELECTORGUI "C:/Users/User/AppData/Local/Autodesk/PowerMill/My-Strategies/GOLD-DRILLS/875-G-DRILL.ptf"

RENAME TOOLPATH "1" ".875-G-DRILL"
EDIT TOOLPATH ".875-G-DRILL" CALCULATE
FORM ACCEPT SFDrilling
}

FEATURESELECT CANCEL

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report