MACRO: Drilling Diameter Selection

MACRO: Drilling Diameter Selection

powermillN5SN5
Contributor Contributor
1,079 Views
4 Replies
Message 1 of 5

MACRO: Drilling Diameter Selection

powermillN5SN5
Contributor
Contributor

Hey folks,

 

I'm having an issue getting this macro to identify user input strings and inputting them into the required fields.

 

Here is what the macro look like so far.

 

STRING $diameter = INPUT "What is the diameter of the your drill?"


//Take user data and start building the program
IF $diameter <= 1.5 {

IMPORT TEMPLATE ENTITY TOOLPATH TMPLTSELECTORGUI "Drilling/Drilling.ptf"
EDIT TPPAGE TOOL
CREATE TOOL ; DRILL
EDIT TOOL ; DIAMETER $diameter //this line is where I am getting the issue

 

} ELSE {

MESSAGE INFO "That is a not a valid Diameter."

}

 

The macro is quite short as I am stuck on that one line.

 

Any help would be awesome.

 

Thanks guys!

0 Likes
Accepted solutions (2)
1,080 Views
4 Replies
Replies (4)
Message 2 of 5

rafael.sansao
Advisor
Advisor
Accepted solution
REAL $diameter = INPUT "What is the diameter of the your drill?"
IF $diameter <= 1.5 {
	IMPORT TEMPLATE ENTITY TOOLPATH TMPLTSELECTORGUI "Drilling/Drilling.ptf"
	EDIT TPPAGE TOOL
	CREATE TOOL ; DRILL
	EDIT TOOL ; DIAMETER $diameter
} ELSE {
	MESSAGE INFO "That is a not a valid Diameter."
}

Rafael Sansão

OptiNC - www.optinc.tech

EESignature

Message 3 of 5

powermillN5SN5
Contributor
Contributor

Thank you!

 

Can't believe I put STRING instead of REAL....

 

I'm an idiot.. haha

Message 4 of 5

powermillN5SN5
Contributor
Contributor

I'm now getting an RPM value error. I've tried several variants.

 

Essentially I want it to input an equation that states  "191 / $diameter"

 

EDIT RPM "191" / $diameter // this line is giving me an error..

 

Thanks!

0 Likes
Message 5 of 5

rafael.sansao
Advisor
Advisor
Accepted solution
EDIT RPM ${191/$diameter}

Rafael Sansão

OptiNC - www.optinc.tech

EESignature