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:

Recommended Posts

In the help file it mentions the Mastercam.txt file (Mill9.txt). It says we have access to every function that is "keymappable". It says they start on line #9001. But when I go to that line it is on the middle of group. Could someone guide me to the correct spot in the file? I would like to print them out to help make it easier to look up.

 

Thanks

Link to comment
Share on other sites

Here is a file with all the commands, and a few examples at the bottom.

 

code:

'////////////////////////////////////////////////////////////////////////////////

'//

'// Author: PCR

'// Date: 11/02/2003 03:19 PM

'// File Name: RunCommand.vbs

'//

'// Description: Runs a mastercam menu command and creates a rectangle from to user defined points.

'// Press ESC key when done.

'//

'// Comments: Run almost any Mastercam command - this gives access To every Function

'// that Is ‘keymappable’. This list appears when F10 Is hit. The input character

'// ‘codes’ are listed In the Mastercam .TXT File For the product you’re running,

'// (i.e. Mill9.txt, Router9.txt, etc) starting at Line #9001

'//

'// *******************************

'// ****** Router Commands ********

'// *******************************

 

''9001. "zoom: Screen-Zoom"

''9002. "unzoom: Screen-Unzoom"

''9003. "repaint: Screen-Repaint"

''9004. "analyze: Analyze"

''9005. "delete: Delete"

''9006. "file: File"

''9007. "modify: Modify"

''9008. "create: Create"

''9009. "dispinfo: Screen-Display info"

''9010. "help: Help"

''9011. "fit: Screen-Fit"

''9012. "unzoom8: Screen-Unzoom by 0.8"

''9013. "curpos: Cursor Tracking (Toggle)"

''9014. "delwndw: Delete-Window"

''9015. "editfile: File-Edit"

''9016. "blank: Screen-Blank"

''9017. "config: Screen-Configure"

''9018. "drwaxes: Screen-Draw axes"

''9019. "rundll: Execute C-Hook"

''9020. "draftpm: Draft-Globals"

''9021. "font: Menu Font"

''9022. ""

''9023. "mmalloc: List Memory"

''9024. "mfile: List Files"

''9025. "undo: Undo"

''9026. "surfdisp: Screen-Surf Disp"

''9027. "drawnc: Screen-Draw Toolpath"

''9028. "vwports: Screen-Viewports"

''9029. "version: Version"

''9030. "xform: Xform"

''9031. "autosave: File-AutoSave"

''9032. "group: Groups"

''9033. "chgcolrs: Screen-Change Colors"

''9034. "chglevs: Screen-Change Levels"

''9035. "autocl: Automatic Centerlines"

''9036. "color: Main Color"

''9037. "level: Levels-Main"

''9038. "mask: Levels-Mask"

''9039. "tplane: Tplane"

''9040. "cplane: Cplane"

''9041. "gview: Gview"

''9042. "zdepth: Cplane-Depth"

''9043. "levdlg: Levels-Dialog"

''9044. "vislev: Levels-Visible"

''9045. "toolbar: Toolbar Visible (Toggle)"

''9046. "dbstats: Screen-Statistics"

''9047. "endpts: Screen-Endpoints"

''9048. "clrcolrs: Screen-Clear Colors"

''9049. "shade: Screen-Surf Disp-Shading"

''9050. "crpoint: Create-Point"

''9051. "crptpos: Create-Point-Position"

''9052. "ptalong: Create-Point-Along Entity"

''9053. "nodepts: Create-Point-Node Points"

''9054. "ctrlpts: Create-Point-Cpts NURBS"

''9055. "ptdynmic: Create-Point-Dynamic"

''9056. "crptlen: Create-Point-Length"

''9057. "ptsrfprj: Create-Point-Surface Project"

''9058. "crline: Create-Line"

''9059. "clhorz: Create-Line-Horizontal"

''9060. "clvert: Create-Line-Vertical"

''9061. "clepts: Create-Line-Endpoints"

''9062. "clmulti: Create-Line-Multi"

''9063. "clpolar: Create-Line-Polar"

''9064. "cltan: Create-Line-Tangent"

''9065. "cltanang: Create-Line-Tangent-Angle"

''9066. "cltan2a: Create-Line-Tangent-2 Arcs"

''9067. "cltanpt: Create-Line-Tangent-Point"

''9068. "clperp: Create-Line-Perpendicular"

''9069. "clparal: Create-Line-Parallel"

''9070. "crarc: Create-Arc"

''9071. "capolar: Create-Arc-Polar"

''9072. "cactrpt: Create-Arc-Polar-Center Point"

''9073. "casktch: Create-Arc-Polar-Sketch"

''9074. "castart: Create-Arc-Polar-Start Point"

''9075. "caend: Create-Arc-Polar-End Point"

''9076. "caepts: Create-Arc-Endpoints"

''9077. "ca3pts: Create-Arc-3 points"

''9078. "catan: Create-Arc-Tangent"

''9079. "catan1: Create-Arc-Tangent-1 Entity"

''9080. "catan3: Create-Arc-Tangent-3 Entities"

''9081. "catanpt: Create-Arc-Tangent-Point"

''9082. "ca2ptcir: Create-Circle-2 Points"

''9083. "ca3ptcir: Create-Circle-3 Points"

''9084. "captrad: Create-Circle-Point/Radius"

''9085. "captdia: Create-Circle-Point/Diameter"

''9086. "captedge: Create-Circle-Point/Edge"

''9087. "crfillet: Create-Fillet"

''9088. "crspline: Create-Spline"

''9089. "crcurve: Create-Curve"

''9090. "ellipse: Create-Ellipse"

''9091. "ccconst: Create-Curve-Const Parameter"

''9092. "ccedge: Create-Curve-One Edge"

''9093. "ccinter: Create-Curve-Intersect"

''9094. "ccpatch: Create-Curve-Patch Boundaries"

''9095. "ccflow: Create-Curve-Flowline"

''9096. "ccproj: Create-Curve-Project"

''9097. "ccdynmic: Create-Curve-Dynamic"

''9098. "ccpart: Create-Curve-Parting Line"

''9099. "crsurf: Create-Surface"

''9100. "csloft: Create-Surface-Loft"

''9101. "cscoons: Create-Surface-Coons"

''9102. "csruled: Create-Surface-Ruled"

''9103. "csrev: Create-Surface-Revolved"

''9104. "csswept: Create-Surface-Swept"

''9105. "csdraft: Create-Surface-Draft"

''9106. "csfillet: Create-Surface-Fillet"

''9107. "csofst: Create-Surface-Offset"

''9108. "cstrim: Create-Surface-Trim"

''9109. "csblend: Create-Surface-2 Surface Blend"

''9110. "crrec: Create-Rectangle"

''9111. "rec1pt: Create-Rectangle-1 Point"

''9112. "rec2pts: Create-Rectangle-2 Points"

''9113. "crdraft: Create-Drafting"

''9114. "cddim: Create-Drafting-Dimension"

''9115. "crnote: Create-Drafting-Note"

''9116. "crlabel: Create-Drafting-Label"

''9117. "crleader: Create-Drafting-Leader"

''9118. "crwit: Create-Drafting-Witness Line"

''9119. "eddraft: Create-Drafting-Multi edit"

''9120. "crhatch: Create-Drafting-Hatch"

''9121. "chamfer: Create-Chamfer"

''9122. "crlets: Create-Letters"

''9123. "pattern: Create-Pattern"

''9124. "anzpt: Analyze-Point"

''9125. "anzonly: Analyze-Only"

''9126. "anzbpts: Analyze-Between points"

''9127. "anzang: Analyze-Angle"

''9128. "anzdynm: Analyze-Dynamic"

''9129. "anzarea: Analyze-Area Calculations"

''9130. "eamod: Entity Attributes (Apply)"

''9131. "anzscurv: Analyze-Surfaces-Curvature"

''9132. "anznorm: Analyze-Surfaces-Test Normals"

''9133. "anzbase: Analyze-Surfaces-Base Surfs"

''9134. "delchain: Delete-Chain"

''9135. "deldup: Delete-Duplicate"

''9136. "delonly: Delete-Only"

''9137. "delall: Delete-All"

''9138. "delgrp: Delete-Group"

''9139. "delreslt: Delete-Result"

''9140. "crptperp: Create-Point-Perpendicular"

''9141. "crptcirc: Create-Point-Small Circles

''9142. "undelete: Delete-Undelete"

''9143. " "

''9144. "filemrg: File-Merge"

''9145. "filesave: File-Save"

''9146. "fileget: File-Get"

''9147. "hardcopy: File-Hardcopy"

''9148. "browse: File-Browse"

''9149. "communic: File-Communications"

''9150. "convert: File-Convert"

''9151. "ascii: File-Convert-ASCII"

''9152. "cadl: File-Convert-CADL"

''9153. "dxf: File-Convert-DXF (pre-V9)"

''9154. "iges: File-Convert-IGES"

''9155. "vda: File-Convert-VDA"

''9156. " "

''9157. "renumber: File-Renumber"

''9158. " "

''9159. "shell: File-DOS Shell"

''9160. "levelrep: Levels-Report"

''9161. "trim: Modify-Trim"

''9162. "trim1: Modify-Trim-1 Entity"

''9163. "trim2: Modify-Trim-2 Entities"

''9164. "trim3: Modify-Trim-3 Entities"

''9165. "trim2pt: Modify-Trim-To Point"

''9166. "trimmany: Modify-Trim-Many"

''9167. "closearc: Modify-Trim-Close Arc"

''9168. "divide: Modify-Trim-Divide"

''9169. "break: Modify-Break"

''9170. "brkarcs: Modify-Break-Arcs"

''9171. "brkmany: Modify-Break-Many Pieces"

''9172. "brk2pcs: Modify-Break-2 Pieces"

''9173. "brklen: Modify-Break-At Length"

''9174. "brknote: Modify-Break-Draft/Line"

''9175. "brkhatch: Modify-Break-Hatch/Line"

''9176. "brkcdata: Modify-Break-Cdata/Line"

''9177. "join: Modify-Join"

''9178. "modnorm: Modify-Normal"

''9179. "modnbs: Modify-Cpts NBS"

''9180. "x2nbs: Modify-X to NBS"

''9181. "extend: Modify-Extend"

''9182. "drag: Modify-Drag"

''9183. "scrnctr: Screen-Center"

''9184. "initscrn: File-New"

''9185. "combvws: Screen-Combine Views"

''9186. "plot: Screen-Plot"

''9187. "xfmmir: Xform-Mirror"

''9188. "xfmrot: Xform-Rotate"

''9189. "xfmscale: Xform-Scale"

''9190. "xfmsqsh: Xform-Squash"

''9191. "xfmtrans: Xform-Translate"

''9192. "xfmofst: Xform-Offset"

''9193. "xfmoctr: Xform-Offset Contour"

''9194. "tpmenu: Toolpaths"

''9195. "contour: Toolpaths-Contour"

''9196. "drill: Toolpaths-Drill"

''9197. "pocket: Toolpaths-Pocket"

''9198. "ncflow: Toolpaths-Flowline"

''9199. "ncmsurf: Toolpaths-Surface"

''9200. "ncproj: Toolpaths-Project"

''9201. "nctrim: Toolpaths-Trim"

''9203. "nccoons: Toolpaths-Coons"

''9204. "ncruled: Toolpaths-Ruled"

''9205. "ncswept: Toolpaths-Swept"

''9206. "ncrev: Toolpaths-Revolution"

''9208. "manent: Toolpaths-Manual Entry"

''9209. "ncpoint: Toolpaths-Point"

''9215. "filter: NC Utils-Filter"

''9216. "pstmenu: NC Utils-Post"

''9217. "pstchg: NC Utils-Post-Change"

''9218. "pstrun: NC Utils-Post-Run"

''9219. "pstrev: NC Utils-Post-Reverse"

''9220. "deftls: NC Utils-Define Tools"

''9221. "setsht: NC Utils-Setup Sheet"

''9223. "exefunc: Execute Function"

''9224. "prompt: Prompt Visible (Toggle)"

''9225. "gvtop: Gview-Top"

''9226. "gvfront: Gview-Front"

''9227. "gvside: Gview-Side"

''9228. "gviso: Gview-Isometric"

''9229. "gvnum: Gview-Number"

''9230. "gvlast: Gview-Last"

''9231. "gvent: Gview-Entity"

''9232. "gvrot: Gview-Rotate"

''9233. "gvmouse: Gview-Mouse"

''9234. "gvdymic: Gview-Dynamic"

''9235. "cporgn: Cplane-Origin"

''9236. "cp3d: Cplane-3D"

''9237. "cptop: Cplane-Top"

''9238. "cpfrnt: Cplane-Front"

''9239. "cpside: Cplane-Side"

''9240. "cpnum: Cplane-Number"

''9241. "cplast: Cplane-Last"

''9242. "cpent: Cplane-Entity"

''9243. "cprot: Cplane-Rotate"

''9244. "cpnorm: Cplane-Normal"

''9245. "cpmouse: Cplane-Mouse"

''9246. "cppxz: Cplane-XZ(+)"

''9247. "cpnxz: Cplane-XZ(-)"

''9248. "cppdz: Cplane-DZ(+)"

''9249. "cpndz: Cplane-DZ(-)"

''9250. "eamgr: Entity Attributes Manager"

''9251. "extsrf: Modify-Surface-Extend"

''9252. "clipbrd: Screen-To Clipboard"

''9253. "regen: Screen-Regenerate"

''9254. "slccrvs: Create-Point-Slice"

''9255. "slcsrfs: Create-Curve-Slice"

''9256. "catan2: Create-Arc-Tangent-2 Entities"

''9257. "circmill: Toolpaths-Circle Mill"

''9258. "sprlhlx: Create-Spiral/Helix

''9259. "crptgrid: Create-Point-Grid"

''9260. "crptbcir: Create-Point-Bolt Circle"

''9261. "fillet: Create-Fillet-2 Entities"

''9262. "filletc: Create-Fillet-Chain"

''9263. "mcplay: Macro-Playback (Toggle)"

''9264. "mcrec: Macro-Record (Toggle)"

''9265. "mcstop: Macro-Pause (Toggle)"

''9266. "anzsnrms: Analyze-Surfaces-Set Normals"

''9267. "crpolyg: Create-Polygon"

''9268. "clprppt: Create-Line-Perpendicular-Pt"

''9269. "clprpar: Create-Line-Perpendicular-Arc"

''9270. "clplldst: Create-Line-Parallel-Dist/Side"

''9271. "clpllpt: Create-Line-Parallel-Point"

''9272. "clpllar: Create-Line-Parallel-Arc"

''9273. "clbisect: Create-Line-Bisect"

''9274. "catancl: Create-Arc-Tangent-Center Line"

''9275. "undelent: Delete-Undelete-Single"

''9276. "hide: Hide"

''9277. "gridprms: Screen-Grid"

''9278. "catadyn: Create-Arc-Tangent-Dynamic"

''9279. "ramsaver: File-RAMsaver"

''9280. "chgattrs: Screen-Change Attributes"

''9281. "jobsetup: Toolpaths-Job Setup"

''9282. "oplist: Toolpaths-Operations Manager"

''9283. "namview: WCS / View Manager"

''9284. "cnv2arcs: Modify-Convert to Arcs"

''9285. "ccedges: Create-Curve-All Edges"

''9286. "studio: Screen-Surf Disp-Studio"

''9287. "clclose: Create-Line-Closest"

''9288. "autocur: AutoCursor (Toggle)"

''9289. "shadetog: Fulltime Shading (Toggle)"

''9290. "quitop: Delete-Last Operation"

''9291. "editlast: Modify-Last Operation"

''9292. "grnamed: Gview-Named"

''9293. "cpnamed: Cplane-Named"

''9294. "tpnamed: Tplane-Named"

''9295. "multiax: Toolpaths-MultiAxis"

''9296. "curve5ax: Toolpaths-Curve 5 Axis"

''9297. "drill5ax: Toolpaths-Drill 5 Axis"

''9298. "swarf5ax: Toolpaths-Swarf 5 Axis Floor"

''9299. "flow5ax: Toolpaths-Flow 5 Axis"

''9300. "rotary4x: Toolpaths-Rotary 4 Axis"

''9301. "grnormal: Gview-Normal"

''9302. "greqcpln: Gview-Equals Cplane"

''9303. "greqtpln: Gview-Equals Tplane"

''9304. "autodesk: File-Convert-AutoDesk"

''9306. "dfregen: Draft-Regenerate-All"

''9307. "dfrgsel: Draft-Regenerate-Selected"

''9308. "dfrgaut: Draft-Regenerate-Auto (Toggle)"

''9309. "crdmhz: Create-Dimension-Horizontal"

''9310. "crdmvt: Create-Dimension-Vertical"

''9311. "crdmpll: Create-Dimension-Parallel"

''9312. "crdman: Create-Dimension-Angular"

''9313. "crdmdia: Create-Dimension-Circular"

''9315. "crdmbsln: Create-Dimension-Baseline"

''9316. "crdmchn: Create-Dimension-Chained"

''9317. "crdmord: Create-Dimension-Ordinate"

''9318. "crdmpt: Create-Dimension-Point"

''9319. "dfvdate: Draft-Regenerate-Validate"

''9320. "sldhist: Create-Solids-History"

''9321. "sldmake: Create-Solids"

''9322. "hidemore: Hide-Hide More"

''9323. "unhdsome: Hide-Unhide Some"

''9324. "makebbox: Create-Bounding Box"

''9325. "setmain: Levels-Main (from entity)"

''9326. "gvbottom: Gview-Bottom"

''9327. "gvback: Gview-Back"

''9328. "gvleft: Gview-Left"

''9350. "gvdypan: Gview-Dynamic Pan"

''9351. "gvdyzum: Gview-Dynamic Zoom"

''9352. "attribs: Attributes"

''9353. "anznumbr: Analyze-Number"

''9354. "anzchain: Analyze-Chain"

''9355. "anzckmdl: Analyze-Surfaces-Check Model"

''9356. "anzsmall: Analyze-Surfaces-Small Surfs"

''9357. "anzcksld: Analyze-Surfaces-Check Solid"

''9358. "xfmstrch: Xform-Stretch"

''9359. "xfmroll: Xform-Roll"

''9360. "sldext: Solids-Extrude"

''9361. "sldrev: Solids-Revolve"

''9362. "sldsweep: Solids-Sweep"

''9363. "sldloft: Solids-Loft"

''9364. "sldflt: Solids-Fillet"

''9365. "sldchmfr: Solids-Chamfer"

''9366. "sldshell: Solids-Shell"

''9367. "sldbool: Solids-Boolean"

''9368. "sldprim: Solids-Primitive"

''9369. "slddrfac: Solids-Draft face"

''9370. "sldtrim: Solids-Trim"

''9371. "sldlayot: Solids-Layout"

''9372. "sldfeat: Solids-Find features"

''9373. "sldthick: Solids-Thicken"

''9374. "sldrmfac: Solids-Remove faces"

'//

'////////////////////////////////////////////////////////////////////////////////

 

 

'///////////////// My Constants /////////////////

''9159. "shell: File-DOS Shell"

''9112. "rec2pts: Create-Rectangle-2 Points"

''9011. "fit: Screen-Fit"

Const DEF_DOS = "shell"

Const DEF_CREATE_REC_2_POINTS = "rec2pts"

Const DEF_ZOOM_ALL = "fit"

 

 

'///////////////// My Global Variables //////////

 

 

 

' -- Start Script

Call Main()

 

 

' ////////////////////

' Sub Declaration

' ////////////////////

Sub Main()

 

 

Call RunMastercamCommand(DEF_CREATE_REC_2_POINTS)

 

Call RunMastercamCommand(DEF_ZOOM_ALL)

 

End Sub

Link to comment
Share on other sites

OK, I hope this doesn't sound to stupid. You can use VBS to access all of these commands but how do you get the data entered into the command.

 

Let me give an example of what I am trying to do. I want to Create-Drafting-Note. How do I automatically get it to enter the data into the form and select some of the functions in the form? Is this even possible? Or does it have to be done manually?

 

Thanks

Link to comment
Share on other sites
  • 1 year later...

I found this out while writing a Python script for something totally unrelated:

 

code:

'///////////////////////////////////////////////////////////////////////////////

'//

'// Author: Chris Bellini [email protected]

'// Copyright © 2005 In-House Solutions Inc.

'// Date: 05/31/2005 4:47 PM

'// File Name: mcam_clipboard.vbs

'// Description: an example of copying text to-and-from the Windows clipboard

'// from Mastercam

'//

'// Comments:

'// - 05/31/2005 <cvb>: initial version

'//

'//

'// ----------------------------------------------------------------------------

'// This library is free software; you can redistribute it and/or

'// modify it under the terms of the GNU Lesser General Public

'// License as published by the Free Software Foundation; either

'// version 2.1 of the License, or (at your option) any later version.

'//

'// This library is distributed in the hope that it will be useful,

'// but WITHOUT ANY WARRANTY; without even the implied warranty of

'// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

'// Lesser General Public License for more details.

'//

'// You should have received a copy of the GNU Lesser General Public

'// License along with this library; if not, write to the Free Software

'// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,

'// MA 02110-1301, USA

'///////////////////////////////////////////////////////////////////////////////

 

' call the main subroutine

Call Main()

 

' Purpose: The main subroutine

Sub Main()

Dim strCurrClipboard ' text we'll retrieve from the clipboard

Dim strTestString : strTestString = "Copied from Mastercam VBS"

 

' copy some text to the Windows clipboard

Call SendTextToClipboard(strTestString)

 

' retrieve what's currently copied to the Windows clipboard

strCurrClipboard = GetTextFromClipboard()

 

' let's see if it actually worked (it damn-well better have)

If (Len(strCurrClipboard) < 1) Then

ShowString "Error: Unable to retrieve text from Windows clipboard."

Else

ShowString strCurrClipboard

End If

End Sub

 

 

' Purpose: Send text to Windows clipboard

' I: text to be "copied" to the Windows clipboard

' O: (none)

Sub SendTextToClipboard(strCopiedText)

Dim objIE ' IE object

Dim objData ' object to hold clipbaord data

 

 

' Create an Internet Explorer object

Set objIE= CreateObject("InternetExplorer.Application")

 

' Stall IE and allow it to be our yellow-brick road to the clipboard.

' Quit IE once the data has been copied.

With objIE

Do

.Navigate "about:clipdata"

Loop While .busy

 

Set objData = .Document.ParentWindow.ClipboardData

End With

 

objData.SetData "text", strCopiedText

objIE.Quit

 

' cleanup

Set objIE = Nothing

Set objData = Nothing

End Sub

 

 

' Purpose: Retrieve text data currently on Windows clipboard

' I: (none)

' O: current Windows clipboard text

Function GetTextFromClipboard()

Dim objHTML ' MS HTML object

 

 

' Create an MS HTML object

Set objHTML = CreateObject("htmlfile")

 

' Retrieve the data from the clipbaord and return it.

GetTextFromClipboard = objHTML.ParentWindow.ClipboardData.GetData("text")

 

' cleanup

Set objHTML = Nothing

End Function

However, it will only copy text. The SetData() method can only take text or a URL (perhaps a URL to an image would work...never tried). Otherwise, you could try AutoIT's DLL that you can use from VBS; I've only heard about it...never used it.

 

HTH.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

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...