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:
I have written vb scripts for ver. 9, and put them onto the toolbar. The problem is mastercam assigns all vb scripts the same icon. Is there a way to specify a different icon for each VB script icon?
Karl
Thanks Mick
That solution worked great. I was told
( incorrectly I guess) by another that the file had to be created before the stream writer could use it. The try also is a much more readable style. I am going to use this often.
Karl
Mick,
I have a close statement after writing. The error comes only when the script has to create the file first in the first place. If the file already exists the streamwriter works as advertised. I am not to familar with the try-catch statement, could you give me an example?
Karl
Hi All,
I know there are a lot of vb programmers here so I thought i'd ask. I have a program that checks if a file exists. If not it creates it.
As long as I do not use the routine which creates the file all is good.
If the file does not exist the routine crashes at the streamwriter routine with the error: File is in use by another process. The snippet is here :
If System.IO.File.Exists(strFileName) = False Then
' Create File
Dim file As System.IO.FileStream
file = System.IO.File.Create(strFileName)
End If
' File exist already
Dim objWriter As New System.IO.StreamWriter(strFileName)
' Write Header
objWriter.WriteLine("Job# " & txtJobNumber.Text)
Do I need to close the file after I create it? If so how?
Thanks in advance!!!
Karl
Hi All,
Is there a way to merge a file into an open mastercam file using a string variable? I would like
to ask for a file name save it as a string then merge this file with no other user intervention. We have Directory with over 500 drawings and finding the correct one is time comsuming.
Karl
I'd like to modify the mcam example script of nc for each operation in order to make an nc file using a different post file for each group of tool paths in a file. Is there a GetToolpathGroup somewhere?
Karl
Sorry this would be using mcam ver 9.1
Do not know if it makes a difference.
Hi All,
Would someone please e-mail the above subout zip file? Don't have access to the FTP at work.
E-mail is karl_stickel at verizion dot net
Thanks
Karl
Thanks for the quick reply
Adding the , e$ to the prapid, plin, and pcir fixed the problem.
Nothing can beat this forum for the quality of the responses.
Karl
Christian,
I have looked at the control definition and neither the remove cr/lf or alternate eob boxes are checked.
I will e-mail you the nc code in a second.
Thanks
Karl
I could not find any setting that controls the end of line. It is as if the post does not put any end of line codes. All hard-coded lines are correct. G-Code looks like this:
G00X1.2345Y1.345G1X1.Y2.Z2.F40.S2800M3G0T8M6G0X1.23Y2.43B0.0G3X1.Y2.I3.4J4.F30.G2X1.234.....til the end of the code.
Karl
Slighty off topic
Does anybody have or know of a c-hook or other utility to change the surface normals of all surfaces on a level? We get files with 100's of small surfaces all the wrong way of course.
Karl
James,
It must be past my bedtime 'cause I can't explain my problem clearly.
I have the macro call working...
I can't post the operation manager groups seperatly.
On a side note I think you did some work for my ex-boss a few years back (Alan Budnik). Small World Huh?
Karl
Thanks Guys Great Info on the custom drill cycles.
Problem I have though is each part has from 1 to 6 operation groups in the operation manager.
I need the output to look like this:
G65 P9001 RXXXX ( R is input as a answer to a post question ) ; I got this to work
can't get this to work!!!
only g-code from all of tool path group #1
( end of toolpath group #1 )
G65 P9002 Rxxxx ( Same as R above ) ;
only g-code from all of tool path group #2
( end of toolpath group #2 )
...
...
...
end of program
Karl
[ 12-07-2005, 12:55 AM: Message edited by: Karl@CP PISTONS ]
James, Thanks for the reply, but The macro statement is easy in that it needs only one varible (sp?). What I need to figure out is how to post all of group one only, then output another macro call (easy) then all of group 2 etc...
Karl
JMPARIS,
I've got the post to ask questions to output the macro call.
What i'm looking for is this:
G65 P8001 A2.5 B4.6 R.8 F50.
g-code form toolpath group 1
G65 P8001 A2.5 B4.6 R.8 F50.
g-code from toolpath group 2
G65 P8001 A2.5 B4.6 R.8 F50.
g-code from toolpath group 3
etc...
as many times as their are toolpath groups
Karl
Using ver 9. is there any way to have the post use the toolpath groups? What I would like to do is output some macro statements then the g-code from group #1 then output other macro statements and the g-code from all of group #2 etc...
I might need to loop depending on the number of groups in a file anywhere from 1 to maybe 6 groups. We are using a modified fanuc post with the macro statements hardcoded in.
Thanks
Karl
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.