Need help with hole depth macro

Need help with hole depth macro

Bryan_Shoff
Observer Observer
168 Views
4 Replies
Message 1 of 5

Need help with hole depth macro

Bryan_Shoff
Observer
Observer

I'm trying to write a macro for Powermill that will limit the z depth for a threadmill or drill. I want to be able to select multiple hole feature sets that have different depths but for the ones that are deeper than the cutting length of my tool I want it to know that it can not go past a specific depth. Any help is much appreciated

 

thanks

Bryan

0 Likes
169 Views
4 Replies
Replies (4)
Message 2 of 5

Ed__Jobe
Mentor
Mentor

You haven’t given any information regarding your environment or shown any code. Are you working with AutoCAD? 2D or 3D? Help us out a little. 

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 3 of 5

Bryan_Shoff
Observer
Observer

Hi Ed,

I'm using Powermill. The code I currently have is this

 

IMPORT TEMPLATE PROJECT FILEOPEN
"REFRENCE\T30 .500-13 Thriller_Guhring_Threadmilling OP.ptf"

MACRO PAUSE "SELECT FEATURESET"
EDIT FEATURESET ; DIAMETER ".422"
EXPLORER SELECT Toolpath "Toolpath\T30 .500-13 Thriller_Guhring_Threadmilling OP" NEW
EDIT PAR SELECTED WORKPLANE
EDIT PAR SELECTED BLOCK
ACTIVATE Toolpath "T30 .500-13 Thriller_Guhring_Threadmilling OP"
EDIT DATAFROMTOOL ;
EDIT TOOLPATH ; CALCULATE
EDIT TOOLPATH SAFEAREA RESET
RESET TOOLPATH RAPID

MACRO PAUSE "WARNING!!!!! CHECK Z DEPTH IS LESS THAN 1 INCH"

DIALOGS MESSAGE ON
DIALOGS ERROR ON

0 Likes
Message 4 of 5

Ed__Jobe
Mentor
Mentor

I’m sorry but that’s not VBA. If you’re using a script for software called powermill, why are you asking in a forum for AutoCAD VBA?  You should be looking here

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 5 of 5

Bryan_Shoff
Observer
Observer

Ok I feel dumb. It's pretty obvious I haven't used these forums before. Thanks for the link Ed, I appreciate it

0 Likes