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:

sour kraut

Verified Members
  • Posts

    12
  • Joined

  • Last visited

Recent Profile Visitors

381 profile views

sour kraut's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Sorry I posted this in the wrong section. It should have gone in the regular post section. I do want to manipulate the XML from within the post. I have always had a hard time wrapping my head around creating NEThooks even though I use VB.net recreationally. I need to force myself to work with it I guess. Thanks for the response.
  2. Before I start working on this from scratch, is there a documented or undocumented function in Mastercam's post language that will allow me to sort XML files by node names? Thanks.
  3. I tried the clearaux$ and it deleted everything in the file. This got me wondering, I changed the build postblock so it would call a new aux after closing this one. Long story short, all the info that is suppost to go to the new one is going to this one. So it is definitely not closing the file even though it says it is.
  4. Alright, I moved "augprg$=1" before "subout$=2" and added the *result,e$ so it would output. When I post, it does the same thing and the nc file shows that result = 0, which shows it has closed but it still doesn't run as a vbscript. I ran it through the debug and placed a breakpoint at the beginning of the call postblock. When the post execution stopped, I checked the file in the windows enviroment and it stated that mastercam was still using the file when I tried to delete it. This tells me that it is not truely closing the file. Is there another way to force it to close the file?
  5. THe idea is to have the post write the vbs file, save it, and then run it. I'm working in X7 and have seperated the process into a build postblock and a call postblock.When I run the build by itself it creates the file fine. but the call does not recognize the file as exhisting. If I have the vbs file already created and do not run the build postblock, it runs the vbs correctly. I think it has something to do with the closing of the file in the build. Any help would be very appreciated! pvbsbuild1 sextaux$ ="vbs" spathaux$=spathpst$ snameaux$="DXFSCRIPT" subout$ = 2 auxprg$ = 1 s_vbscript=spathaux$+snameaux$+"."+sextaux$ "Call Main()",e$ "Sub Main()",e$ "writeDXF(",no_spc$,s_quote,no_spc$,spathpst$,no_spc$,"Label.DXF",no_spc$,s_quote,no_spc$,")",e$ "If Not askValue (",no_spc$,s_quote,no_spc$,"Please input a diameter",no_spc$,s_quote,no_spc$, ", 0 , 1000, dblDiameter) Then",e$ "Exit Sub", e$ "End If", e$ "End Sub", e$ auxprg$ = 0 subout$ = 0 result = fclose(s_vbscript) pvbscall1 sextaux$ ="vbs" spathaux$=spathpst$ snameaux$="DXFSCRIPT" s_vbscript=spathaux$+snameaux$+"."+sextaux$ if fexist(s_vbscript),result = runvbs(s_vbscript)
  6. I've looked at all of the VB scripts that come with X6 and the "Toolpath Doors Chook.vbs" shows how to create operations but none of them show how to import toolpath groups or the operations in that group. the code below uses variables for the filepath and name, and the mcOverRide class, and trys to import the operations but fails to. Can anone please point me in the right direction for importing both groups and operations? Please? I'm using the GetOperationTypeFromID which seems to work and returns "132". This is a surface high speed raster toolpath if it makes any difference. Thank you in advance. If MakeOperationFromID(Original_File,1,"",ovOverRide)= mcOPERATION_INVALID Then teststring = GetOperationTypeFromID(Original_File,1) ShowString teststring Else ShowString "ALLS GOOD" End If
  7. The RunMastercamCommand("create_bbox") opens the bounding box dialog and creates the bounding box but does not close the bounding box dialog after it has created it. I'm guessing the next line after the bbox call causes it to close because you are saving the file, but what if I have other operations to perform before I want to save? I have to find the min max values for X and Y after I create the bbox, and then translate all entities based on this back to 0,0. I have all of this working but I wasn't able to get the bbox dialog to close on it's own until I used the shellandwait command. I need to read up more on VB scripting so I don't waste everyones time with questions. Thanks everyone.
  8. I got it figured out. I had to use the shellandwait command, tell it not to wait, and call a seperate vbs file with the wshScell.send key command. Not the best but it will work.
  9. I have another question. How can I automate the bounding box so it opens, creates the box, and then closes? The standard wshShell.SendKeys "o" will not work and I need to automate it. I'm sorry, I know just enough to be annoying.
  10. I know there is a VBS command to import a DXF file but What I'm looking for is a way to import a STL file through the script. Is this possible?

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