- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a setup Macro that I'd like to pop up the import model option first. Adjust my workplanes and block then reimport a previous project that is similar to the current model. Whenever I try to use IMPORT MODEL FILEOPEN in a macro with anything else it will error out. I've tried running it as a separate macro called out from this macro but it never stops to give me time to select a new model and just errors out again. If I just paste the text and run in in the command window it will work as intended.
Also does anyone have a faster way to update the reference projects toolpaths workplanes and blocks to match the new models workplane and blocks or a way to delete the reference model in a wildcard $ fashion automatically.
Sorry for the long post this is me trying to consolidate multiple macros into one simple to understand process for others.
Thank you in advance ladies/gents.
Cheers, Kodi
MACRO PAUSE " Choose New Model"
IMPORT MODEL FILEOPEN
DELETE WORKPLANE ALL
FORM BLOCK
EDIT BLOCK TOLERANCE ".01"
EDIT BLOCK RESETLIMIT "0.0"
EDIT BLOCK LIMITTYPE MODEL
EDIT PAR powermill.Options.Block.UseReferenceModel 1
EDIT BLOCKTYPE BOX
EDIT BLOCK COORDINATE NAMED
DRAW BLOCK
EDIT BLOCK DRAWMODE 25
EDIT BLOCK ALL UNLOCK
EDIT BLOCK RESETLIMIT "0.0"
EDIT BLOCK RESET
BLOCK ACCEPT
MODE WORKPLANE_CREATE ; INTERACTIVE BLOCK
MACRO PAUSE "Choose a point on the block"
MODE WORKPLANE_EDIT START "1"
MODE WORKPLANE_EDIT NAME "Top"
MODE WORKPLANE_EDIT SWAP_AXES
MACRO PAUSE "Choose Axes Orientation"
MODE WORKPLANE_EDIT FINISH ACCEPT
ACTIVATE Workplane "Top"
FORM BLOCK
EDIT BLOCK COORDINATE NAMED
EDIT BLOCK NAMEDWORKPLANE "Top"
EDIT BLOCK RESETLIMIT "0.0"
EDIT BLOCK RESET
EDIT BLOCK ZMAX "0.001"
EDIT BLOCK ZMAX LOCK
EDIT BLOCK ZMIN LOCK
EDIT BLOCK RESETLIMIT "0.26"
EDIT BLOCK RESET
MACRO PAUSE "Make Sure On Center"
BLOCK ACCEPT
EDIT TOOLPATH LEADS RAISEFORM
EDIT TOOLPATH LEADS PAGE RAPIDMOVES
EDIT TOOLPATH SAFEAREA MEASURE_FROM BLOCK_AND_MODEL
EDIT PAR 'Rapid.CalculateDimensions.RapidClearance' ".6"
EDIT PAR 'Rapid.CalculateDimensions.PlungeClearance' ".1"
EDIT TOOLPATH SAFEAREA CALCULATE_DIMENSIONS
LEADS ACCEPT
//Import Reference Project To Use Toolpaths From
MACRO PAUSE "Import Reference Project"
IMPORT MODEL FILEOPEN
Solved! Go to Solution.