Everything posted by Sps82zgz
Sps82zgz posted a topic in Mastercam C-Hook, NET-Hook and VBScript DevelopmentHi everybody, I’m working with X4 and creating a vbs file script. I’m wondering if it’s possible to select operations from the toolpaths and post them off using vbscript? I mean: I want to select some operations and automatically (using the vbs script) post them off (as if I were using toggle posting button). Thanks
Sps82zgz replied to Sps82zgz's topic in Mastercam C-Hook, NET-Hook and VBScript DevelopmentThanks guys for your help, and for wasting your appreciate time answering my question. I have created my needed VB script, basing it on what you told me here, changing my original idea. Finally, I convert the toolpath from post off to post on, because it was very difficult for me to choose only the operations to change. Below I’m going to share my script, so that anybody can use it if needed. '//////////////////////////////////////////////////////////////////////////////// ' -- Start Script Call Main() Sub Main() Dim intOpCount, idx ' -- COGEMOS TODAS LAS OPERACIONES QUE TENEMOS intOpCount = GetOperationCount(vbNullString) ' -- MARCAMOS POST OFF AQUELLAS OPERACIONES QUE ESTÁN POST ON Dim success For idx = 1 To intOpCount success=SetOperationPostingFromID(vbNullString, idx, False) Next RunPostAll "", 1 End Sub '//////////////////////////////////////////////////////////////////////////////// Thanks again.
Sps82zgz replied to Sps82zgz's topic in Mastercam C-Hook, NET-Hook and VBScript DevelopmentThanks for your answers! I’m gonna prove it in my code