Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Search the Community

Showing results for tags 'chainall'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Mastercam Forums
    • Industrial Forum
    • Post Processor Development Forum
    • Educational Forum
    • Woodworking Forum
    • Machining, Tools, Cutting & Probing
    • 3D Printing

Categories

  • Mastercam Demo Software
  • Files Referenced in Books and Videos
    • Instructor Files
    • Mastercam X7
    • Mastercam X6
    • Mastercam X5
    • Mastercam X4
    • Mastercam X3
    • Mastercam X2
    • STEM
  • Free Book Samples
    • Mastercam 2020
    • Mastercam 2019
    • Mastercam 2018
    • Mastercam 2017
    • Mastercam X9
    • Mastercam X8
    • Mastercam X7
    • Mastercam X6
    • Mastercam X5
    • Mastercam X4
    • Mastercam X3
    • STEM Curriculum
  • Mastercam eBooks (PDF)
    • Mastercam 2023
    • Mastercam 2022
    • Mastercam 2021
    • Mastercam 2020
    • Mastercam 2019
    • Mastercam 2018
    • Mastercam 2017
    • Mastercam X9
    • Mastercam X8
    • Mastercam X7
    • Mastercam X6
    • Mastercam X5
    • Mastercam X4
  • Mastercam Documentation
    • Brochures
    • Press Releases
    • Tips & Guides
  • Tools
  • Post Processors
    • Post Processor 'How To' Info
    • Mpmaster (all versions)
    • Mplmaster (all versions)
    • Application Specific Posts
    • Educational Post Processors
    • Post Processor Request Forms
    • Post Processor Feature Checklist Forms

Product Groups

  • Sitewide Subscription
  • Books
    • Older Versions (No Demo Software)
  • eBooks (PDF)
    • Mastercam 2023
    • Older Versions (No Demo Software)
  • Multimedia
    • Older Versions (No Demo Software)
  • Clearance
  • eCourses
  • eCourses

Categories

  • General Mastercam
    • Hasp / Sim License Articles
    • Nethasp
  • Lathe
  • Toolpaths
    • FBM Drill
    • FBM Mill
    • Dynamic Milling
    • Contour
    • Drill
    • Pocket
    • Face
    • 2D Highspeed
    • Engraving
    • Surface Rough
    • Surface Finish
    • Surface High Speed
    • Curve 5 axis
    • Drill 5 Axis
    • Swarf 5 Axis
    • Multisurface 5 Axis
    • Flow 5 Axis
    • Rotary 4 Axis
    • Port 5 axis
    • Advanced Multiaxis
    • Circle Paths
    • Circle 5 Axis
  • Wire EDM
  • Art
  • Post-Processing
  • Editors & DNC
  • Add-ons + Chooks & Nethooks
  • Windows, PC & Hardware Troubleshooting
    • Windows Issues
    • Videocards
    • Network & Filesharing
  • Multiaxis
  • eBooks

Blogs

  • Mastercam Training Solutions
  • eMastercam Community
  • Reseller Blog
  • Future of CNC Manufacturing Education
  • Mastercam Xtras
  • Latest News

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Interests


Location


Mastercam SIM Number


AIM


MSN

Found 1 result

  1. Soo, I've been working on a vbscript to auto assign toolpaths based on the toolpath door example and another drilling example. I would definitely like to expand it further to read the z depth of entities and pass that into the overrides not sure if that's possible. Also for some reason when I try to assign a drill toolpath to edge curve instead of circle centerpoints the points are translated into the mirror position of the x Axis so in the Y- region. Here's what I've come up with so far.It has been saving me a lot of time chaining and selecting points. '///////////////// My Constants ///////////////// ' ' -- Operations library Const DEF_OPERATIONS_LIB = "ProgramHalfInchPanelWDrill.mcam-operations" Const OP_FILE = "C:\Users\Public\Documents\shared Mcam2018\mill\Ops\ProgramHalfInchPanelWDrill.mcam-operations" ' ' -- Operation comments for each operation saved Const OP_NAME_DRILL = "Drilling Operation" Const OP_COMMENT_DRILL = "Drilling Operation" Const DEF_OP_OUTSIDE_FINAL_CONTOUR = "OUTSIDE FINAL CONTOUR OSCILIATE" Const DEF_OP_OUTSIDE_FINAL_CONTOUR_TWO = "OUTSIDE FINAL CONTOUR TOP TWOD" Const DEF_OP_OUTSIDE_FINAL_CONTOUR_THREE = "OUTSIDE FINAL CONTOUR" ' ' -- Level numbers Const DEF_DRILLPOINT_LEVELONE = 1062 Const DEF_INSIDE_FINAL_LEVEL = 25 Const DEF_OUTSIDE_FINAL_LEVEL = 20 ' -- Start Script Call Main() ' //////////////////// ' Sub Declaration ' //////////////////// Sub Main() Dim strPathToOperations, ovOverRides, strFileName, overrides Dim FSO Set FSO = CreateObject("Scripting.FileSystemObject") If Not IsDrawing Then ShowString "We need a drawing!": Exit Sub strPathToOperations = GetPathFromExtension("Operations") strPathToOperations = AddBackSlash(strPathToOperations) & DEF_OPERATIONS_LIB If Not FSO.FileExists(strPathToOperations) Then ShowString strPathToOperations & "not found." Exit Sub End If strFileName = GetCurrentFileName Set overrides = New McOverride With overrides .FeedRatePercentOn = False .FeedRate = 80 .SpindleSpeedPercentOn = False .SpindleSpeed = 80 End With Set ovOverRides = New McOverride With ovOverRides .DepthOn = False ' -- Override operation depth? .Depth = -.125 ' -- New depth If DepthOn = True .FeedRatePercentOn = True ' -- New feed rate Is a percentage? .FeedRate = 80 .SpindleSpeedPercentOn = True ' -- New spindle speed Is a percentage? .SpindleSpeed= 80 ' -- New spindle speed If SpindleSpeedOn = True End With ' ************************************************************************************************************ ' * Drill all arcs on our DEF_DRILLPOINT_LEVELONE level ' ************************************************************************************************************ Call ZeroPts Dim success success = StartDBSearch(mc_alive, mc_arctype) If success Then Do If Not DEF_DRILLPOINT_LEVELONE <> GetEntityLevel Then Dim Arc Set Arc = New McAr If GetArcData(GetEntityEptr, Arc) = True Then Call AddDrillPoint (Arc.X, Arc.Y, -1) End If End if Loop While NextDBSearch End If If MakeOperationFromName(OP_FILE,OP_NAME_DRILL,OP_COMMENT_DRILL, overrides) <> mcOPERATION_INVALID Then Else ShowString("Could not apply Drilling toolpath") End If Call ZeroPts ' ************************************************************************************************************ ' * Chain all entities on our INSIDE_FINAL_LEVEL level planes set to bottom to chain left cutter comp closed chain ' ************************************************************************************************************ Call SetTPlaneNumber(mcVIEW_BOTTOM) Call SetCPlaneNumber(mcVIEW_BOTTOM) If ChainAll(True, False, DEF_INSIDE_FINAL_LEVEL, vbNullString) Then If MakeOperationFromName(strPathToOperations,DEF_OP_OUTSIDE_FINAL_CONTOUR,DEF_OP_OUTSIDE_FINAL_CONTOUR, ovOverRides) <> mcOPERATION_INVALID Then If MakeOperationFromName(strPathToOperations,DEF_OP_OUTSIDE_FINAL_CONTOUR_TWO,DEF_OP_OUTSIDE_FINAL_CONTOUR_TWO, ovOverRides) <> mcOPERATION_INVALID Then If MakeOperationFromName(strPathToOperations,DEF_OP_OUTSIDE_FINAL_CONTOUR_THREE,DEF_OP_OUTSIDE_FINAL_CONTOUR_THREE, ovOverRides) <> mcOPERATION_INVALID Then Call GetReady Else Call GetReady End If Else Call GetReady End If Else Call GetReady End If Else ShowString "Could not chain INSIDE FINAL level" End If ' ************************************************************************************************************ ' * Chain all entities on our OUTSIDE_FINAL_LEVEL level, planes set to top to chain left cutter comp outside closed chain ' ************************************************************************************************************ Call SetCPlaneNumber(mcVIEW_TOP) Call SetTPlaneNumber(mcVIEW_TOP) If ChainAll(True, False, DEF_OUTSIDE_FINAL_LEVEL, vbNullString) Then If MakeOperationFromName(strPathToOperations,DEF_OP_OUTSIDE_FINAL_CONTOUR,DEF_OP_OUTSIDE_FINAL_CONTOUR, ovOverRides) <> mcOPERATION_INVALID Then If MakeOperationFromName(strPathToOperations,DEF_OP_OUTSIDE_FINAL_CONTOUR_TWO,DEF_OP_OUTSIDE_FINAL_CONTOUR_TWO, ovOverRides) <> mcOPERATION_INVALID Then If MakeOperationFromName(strPathToOperations,DEF_OP_OUTSIDE_FINAL_CONTOUR_THREE,DEF_OP_OUTSIDE_FINAL_CONTOUR_THREE, ovOverRides) <> mcOPERATION_INVALID Then Call GetReady Else Call GetReady End If Else Call GetReady End If Else Call GetReady End If Else ShowString "Could not chain OUTSIDE FINAL level" End If Exit Sub End Sub ' //////////////////// ' Function Declaration ' //////////////////// Function IsDrawing() Dim Ret Ret = StartDBSearch(mc_alive, -1) IsDrawing = Ret End Function ' //////////////////// ' Sub Declaration ' //////////////////// Public Sub GetReady Call FreeChains Call UnselectAll Call RepaintScreen(True) End Sub ' //////////////////// ' Function Declaration ' //////////////////// Function AddBackSlash(sPath) If Right(sPath, 1) <> "\" Then sPath = sPath & "\" AddBackSlash = sPath End Function

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...