Search the Community
Showing results for tags 'VB'.
Good Morning All, When I make a change to a program I need to re-post it to up to 8 different machine types depending on the product line. The typical routine in this shop is to got to the Machine Definition Manager, Pick the required Post-Processor from the drop-down list, click the green check, say yes to the "Replace group machine" prompt, click Post Selected Operations, Name the files (Naming convention is the same depending on machine), and posting. Is there a good VB Script somewhere that I can pick apart and Frankenstein to make this process a little less tedious? If not, can someone point me in the direction of a good example line or two of code for picking the post processor and posting? Thanks! James
Good Morning All, I have recently been working on automating some rather repetitive steps that we take between NX and MasterCAM. I have the NX part complete but seem to be having a hard time finding much research material online for Mastercam VB Scripting. In UG I could record a macro in VB and learn and tweak from that but I am having a hard time figuring out a good way do do something similar in Mastercam. I have scavenged through the example VBS files and managed to pick out a little of what I needed but it is minimal. The steps I am needing to take are... 1) Draw 2 lines outside of the part. 2) Create a Ruled/Lofted Surface between these two lines. 3) Create Curve at Intersection a) Selecting a Parasolid that is already open. Using the Created Ruled/Lofted Surface as Intersection of Parasolid. Can you please point me to a good resource or example for these steps that I can pick apart a bit? Thanks all! James Here is what I have so far, it isn't much yet... Public Const PlaneLevel = 2 Call Main() Sub Main() Call ResetAll Call CreateOutline Call RepaintScreen(True) End Sub Sub ResetAll() Call RepaintScreen(True) Call ClearPromptLines End Sub Sub CreateOutline Dim CLine Dim intRet Set CLine = New McLn With CLine .X1 = -20 .Y1 = -30 .Z1 = 0 .X2 = -20 .Y2 = 50 .Z2 = 0 intRet = CreateLine(CLine, mcCONSTRUCTION_COLOR_CURRENT, PlaneLevel) .X1 = 20 .Y1 = -30 .Z1 = 0 .X2 = 20 .Y2 = 50 .Z2 = 0 intRet = CreateLine(CLine, mcCONSTRUCTION_COLOR_CURRENT, PlaneLevel) End With Set CLine = Nothing End Sub
350 downloadsThis template will allow you to create a Mastercam C# NETHook class library project in Visual Studio 2013. The NETHook API referenced by default is the new NETHook 3.0 API available with the release of Mastercam X7, however, you should be able to reference the current NETHook 2.0 API with Mastercam X6, just remove the existing project reference and select the appropriate NETHook assembly (dll) located in the root directory of your Mastercam installation. Note that this project targets the .NET framework 4.0 When compiling make sure the configuration for the project is set to x64 Once installed you will be able to create a new NETHook project from the New Project dialog. Any questions should be asked here.Free