-
Posts
4,477 -
Joined
-
Last visited
-
Days Won
11
Content Type
Profiles
Forums
Downloads
Store
eMastercam Wiki
Blogs
Gallery
Events
Posts posted by Rekd™
-
-
geeterhead, lol.
No, Jimmy, I couldn't possibly do that, as many of my programs have in excess of 150 toolpaths. It'd take half the trees on my block to print out one setup sheet. (To put things into perspective, I have six 70+ year old oaks in my yard )
-
You mean like the blueprint?
-
Toolpath/Drill/Mask on arc ???
-
-
Each operation in the Operation Manager has a spot on the first page for a program number. If this isn't good enough, you could over-ride that by editing your post to prompt you for a program number.
-
GOOD LUCK RICK!!!
-
quote:pcir pcirout
Are where it's coming from. Search your post for pcir and pcirout.
-
quote:Where is this happening in the post?
Turn on debugging and post again, it will tell you where in the post each line comes from.
-
Here you go. Some mods will be required.
code:'////////////////////////////////////////////////////////////////////////////////
'//'// Author: Matt Finley [email protected]'// Date: 06/05/2004 09:16 AM'// File Name: SavedNCI.vbs'//'// Description: Changes all NCI destinations to match file name, posts that'// file with the specified post, then changes the NCIs'// back to originals. Some modification is required.'//'//'////////////////////////////////////////////////////////////////////////////////Const DEF_POST2 = "HAAS VF3 POST 4 AXIS.PST" ' Post to use (Change this)Dim MC9Path, NCIPath ' Paths usedDim aryDest() ' holds NCI Paths until finished postingDim i ' counterCall ClearPromptLines()Call WriteString("Storing original NCI destinations on " & GetOperationCount("") & " operations...")NCIPath = GetCurrentFileName() ' Set NCI to current MC9 file nameNCIPath = Left(NCIPath, Len(ncipath)-4) & "-Combined.MC9" ' Append "-Combined" to end of new NC name (Change this)' -- Grab all the NCI destinations and store themReDim aryDest(GetOperationCount("")) ' Set array's size to number of opsFor i = 1 To GetOperationCount("") ' Cycle thru opsarydest(i) = GetNciNameFromOperationID("", i) ' Store orignial NCI pathCall SetNciNameFromOperationID(i, NCIPath) ' Set new NCI pathNextCall WriteString(" Done.")Call Main() ' Post it' --Return NCI destinations to the originalsCall WriteString("Restoring original NCI Destinations...")For i = 1 To GetOperationCount("") ' Cycle thru opsCall SetNciNameFromOperationID(i, arydest(i)) ' Retrieve original NCI path from array and applyNextCall ClearPromptLines()Sub Main()Dim strPathDim strCurrentPostMC9Path = GetPathFromExtension("MC9")If Not IsDrawing ThenShowString "Gots to have a file... "Exit SubEnd If' -- Store current poststrCurrentPost = GetPostName' -- Post to MC9's pathstrPath = mc9pathIf strPath = Null Then Exit SubCall SetPostName(DEF_POST2)Call RunPostAll(strPath, 0)' -- Revert back to original postCall SetPostName(strCurrentPost)End SubFunction IsDrawing()Dim RetRet = StartDBSearch(mc_alive, -1)IsDrawing = RetEnd FunctionSoftmill, this is what I use for a tool stop via a drill cycle.
code:pmisc2 #Canned Misc #2 Cycle (User Option)
#Use this postblock to customize drilling cycles 8 - 19#Canned Cycle for Tool Stoppdrlcommonbif drillcyc = 8, pcan1, pbld, n, *sgdrlref, *sgdrill, pxout, pyout, pfzout, pcout,prdrlout, dwell, *feed, strcantext, eelse, n, pfxout, pfyout, en, pfzout, pfcout, en, "M00", en, *max_depth, epcom_moveaThat code gives me this
code:N2 M01
( OPERATION: 1 DRILL )N3 ( OP 1 )N4 ( LOCATE Y )N5 T1 M06(T1: 1/4 CHAMFER MILL)(MAX-DEPTH | Z-1.)N6(OP ID: 1)N7 G00 G90 G54 X0. Y2.5 A0.N8 G43 H1 Z1./ N9N10 X0. Y2.5N11 Z-1.N12 M00N13 Z1.N14 G80N15 G90N16 M01
-
Changes to programs or to posts? I wouldn't think it wise to allow multiple people to edit posts on a daily basis.
-
Just curious, why won't a binary post work? You store the original, and if you need to make changes, make them and re-bin it.
-
quote:I know about that and have done it but I would like to password protect them.
Oh.
-
Found it. There's a file called MPBIN.hlp that explains how to use it.
Mpbin.dll - Post Protection Utility
Setup : Put mpbin.dll, mpbin.txt and mpbin.hlp in your c-hooks directory. Mpbin access code is needed to run option 3 below (post access code). Only dealers are provided an access code from CNC Software, Inc. on request. Put the access code, mpbin.acc, into your main Mastercam
directory.
Description : This post protection utility supplies users/dealers with ways to protect *.PST files. This is done by removing a block of text from the .PST file and converting into a binary file, *.PSB, so it cannot be read.
Files:
.PSM - the original post file
.PST - the post file with a block of text removed
.PSB - the binary file that contains the text missing from the original post file
.ACC - the post access code for a specific post and SIM number
The binary file can be made in three ways, each method has advantages and disadvantages:
1) to run with a specific SIM,
2) to run with any SIM,
3) to run with a post access code.
1) Post binary file for a specific SIM. This method takes the .PSM file and removes a block of text to make the .pst file. Then, using the block of removed text and the user SIM number the .PSB file is made. The resulting .PST/.PSB files will only run on the computer with the specified SIM.
mpbin.dll
postname.psm --------------> postname.pst
SIM number postname.psb (for specific SIM)
The main advantage of this method is that the post binary file will only run on a computer with the right SIM number. So, users cannot read or modify the post and cannot share the post with other users. The disadvantages are a separate post binary file must be made for every SIM that the post will be used with and every time the post is changed new binary files must be made for every SIM that the post will be used with.
2) Post binary file for any SIM. This method takes the .PSM file and removes a block of text to make the .PST file. Then, using the block of removed text and "0" for the SIM number the .PSB file is made. The resulting .PST/.PSB files will run on any computer as long as the SIM is present.
mpbin.dll
postname.psm --------------> postname.pst
postname.psb (for any SIM)
The main advantages of this method are that only one post binary file needs to be made and it will run regardless of the SIM number. It is not nesessary to know the customer SIM number to make the .PSB file. The disadvantage is that even though the users can't read or modify the post the users can share the post with each other. This method enables the check boxes to select the SIM type, Educational, Industrial, Dealer or Control, which the post may run on. Select the type(s) in the dialog box. (Note: SIM type is only active for MP 7.36 and later)
3) Post binary file that requires a post access code. This method takes the .PSM file and removes a block of text to make the .PST file. Then, using the block of removed text and the name of the post the .PSB file is made. Once the .PSB file is made a post access code is needed. The name of the post and the user SIM number are used to make the post access code. The resulting .PST/.PSB files will only run if a valid post access code and valid SIM are present.
mpbin.dll
postname.psm --------------> postname.pst
postname.psb (for post access code)
mpbin.dll
postname --------------> postname.acc
SIM number
The main advantage of this method is that only one post binary file needs to be made an it will run with many SIMS, as long a valid post access code and valid SIM are present. This could be very useful if a post will be used with many SIMS because, when the post is changed only one new binary file needs to be made and it will work for all SIMS with the post access code present. The disadvantages are that a separate post access code is required for every SIM that the post will be used with and any dealer can give a user a post access code for any post that requires one, even if the dealer does not have the original post.
How to use MPBIN :
1. Backing up your post file is not necessary but it is recommended.
2. The first thing to do is rename the original file with extension .PSM.
3. Put the word 'startbin' or 'STARTBIN' on the line before the first line of text to be removed and the word 'endbin' or 'ENDBIN' on the line after the last line of text to be removed. If these words appear in comments (after #) then they will be ignored.
4. Run the c-hook MPBIN.DLL. Choose the protection method you want to use and enter the required information. Select OK to produce the files.
5. At this point you are ready to ship the .PST and .PSB files, and .ACC file if there is one, to the customer.
6. Save the original post file in case the customer needs a new SIM so a new .PSB file or .ACC file can be made using the new SIM number.
Notes :
1. Only one block of text can be moved to the .PSB file.
2. Any amount of text from one line to the entire post processor file can be moved to the .PSB file. The amount of text removed is up to you but it is to your advantage to leave enough text for the user to make minor modifications without your help.
3. After the block of text is removed the line with the word 'startbin' will remain in the .PST file to mark the location for MP to begin reading from the .PSB file.
4. After the block of text is removed the line with the word 'endbin' is no longer needed and is thrown out (does not appear in the .PST or .PSB).
5. If you run a post with extension .PSM then the words 'startbin' and 'endbin' will be ignored.
6. The .ACC file, if there is one, must be in the same directory as the .PST and .PSB files.
7. When using method 3, the post access code and .PSB are dependent on the name of the post file. If you rename the .PST/.PSB/.ACC files they will not run properly. In this case you will have to remake the files using the new name.
8. Selecting "Always allow post to run on dealer SIM" overrides all other setting for dealer SIMs and allows the post to run.
-
You can protect them by converting part of it to binary. I think there's info in a help file somewhere, but don't remember where.
-
Thanks, that looks like I'll be able to get it to work. Will let you know.
btw, I changed
Sub SendTextToClipboard(strCopiedText)
to
Sub SendToClipboard(strCopiedText)
-
quote:BUT your HAAS has to be set up for repeat tapping.
'splane yourself, Lucy
-
quote:Can vbscript access the clipboard?
*bump*
Is this possible in VBS form MC?
-
LoL
If I get time this weekend, I'll try to dial it in for you.
-
quote:and not have to be changing .nci destinationsevery time I post.
In a nutshell, you can do it. (You'll have to format and declare variables etc yourself, I'm short on time. )
To change NCI paths, use something like this. (It stores the current NCI paths in an array so you can restore them later, but it must all be done in the same script at the same time unless you write the NCI's to a file instead of an array.)
code:NCIPath = GetCurrentFileName() ' Set NCI to current MC9 file name
NCIPath = Left(NCIPath, Len(ncipath)-4) & "-Combined.MC9" ' Append "-Combined" to end of new NC name' -- Grab all the NCI destinations and store themReDim aryDest(GetOperationCount("")) ' Set array's size to number of opsFor i = 1 To GetOperationCount("") ' Cycle thru opsarydest(i) = GetNciNameFromOperationID("", i) ' Store orignial NCI pathCall SetNciNameFromOperationID(i, NCIPath) ' Set new NCI pathNextNow post normally using your favorite method (from the same script). You can use multiple posts like this;
code:Const DEF_POST1 = "HAAS VF3 POST PRESTAGE 4 AXIS.PST"
Const DEF_POST2 = "Mill2.set"Dim MC9PathDim strPathDim strCurrentPostMC9Path = GetPathFromExtension("mc9")If Not IsDrawing ThenShowString "We need a drawing"Exit SubEnd If' -- Store current poststrCurrentPost = GetPostName' -- Prompt user for a folder to export NCstrPath = BrowseForFolder("Choose Folder for NC Ouput", mc9path)If strPath = Null Then Exit SubCall SetPostName(DEF_POST1)Call RunPostAll(strPath, False)' -- Prompt user for a folder to export HTMLstrPath = BrowseForFolder("Choose Folder for Setup Sheet Ouput", mc9path)If strPath = Null Then Exit SubCall SetPostName(DEF_POST2)Call RunPostAll(strPath, False)' -- Revert back to original postCall SetPostName(strCurrentPost)End SubThen you'll want to restore the original NCI's, so use something like this.
code:' --Return NCI destinations to the originals
Call WriteString("Restoring original NCI Destinations...")For i = 1 To GetOperationCount("") ' Cycle thru opsCall SetNciNameFromOperationID(i, arydest(i)) ' Retrieve original NCI path from array and applyNextAgain, I'm short on time. Run thru this and if you have ?'s let me know.
-
-
quote:The WCS in which you created the stock must be active to verify correctly.
Doesn't have to be. If you regen an op in that WCS, it will leave the stock for verify in that WCS even if you're in a different WCS. The trick is to regen the operation in the original WCS just before you verify.
-
C:Mcam91HelpVBSCRIPT.HTM
Or from the editor in the Help menu.
-
If the problem occurs when you verify from a WCS that's OTHER than the WCS you set your stock boundries with, then there's a trick:
Select ANY operation from the original WCS (that you created the stock with,) and regen it. Then without changing WCS', select all ops and verify. This will 'trick' the stock setup into behaving the way you'd expect.
-
Merge only brings in geometry
Hidden feature, bug, or am I just slow???
in Industrial Forum
Posted
I'm running the mmouse and mcutils chooks. I was MWzooming and slid my cursor over the color select menu and level select menu while zooming and it started flipping thru colors and levels!
Very cool.
It will cycle thru all colors/levels and start over. Only thing is, on levels, you can take it to level zero. I was able to create geo in that level, and when I went into the level dialog, it showed level zero in the little box, but not in the list. It also did not show the added geometry. The text for the level shows as "all off". When I click OK, it want's me to enter a level between 1 and 255.
Very interesting. Guess I should create a new file instead of playing around with a good program eh?