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:

Mick George

CNC Software
  • Posts

    629
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Mick George

  1. 2 minutes ago, ThickChips said:

    Hi,

    Following the guide. The guide is listed in X8, I had to modify the path for 2022. 

    In post build events, I set the field to:

    copy "$(TargetPath)" "C:\Program Files\Mastercam 2022\Mastercam\chooks\"
    copy "$(ProjectDir)\Resources\FunctionTable\$(TargetName).ft" "C:\Program Files\Mastercam 2022\Mastercam\chooks\$(TargetName).ft"

    I get error at startup, exited with code 0.

    Do spaces need properly escaped in the path name?

     

    Thanks

    With Mastercam 2022 and beyond it is no longer recommended to install to the chooks folder due to elevated permissions requirement.

     

    Replace the post build step as follows, assuming these paths match your paths:

    IF NOT EXIST "C:\Users\Public\Documents\Shared Mastercam 2022\Add-Ins" MKDIR "C:\Users\Public\Documents\Shared Mastercam 2022\Add-Ins"
    copy "$(TargetPath)" "C:\Users\Public\Documents\Shared Mastercam 2022\Add-Ins\$(TargetFileName)"
    copy "$(ProjectDir)Resources\FunctionTable\$(TargetName).ft" "C:\Users\Public\Documents\Shared Mastercam 2022\Add-Ins\$(TargetName).ft"

  2. 3 minutes ago, ThickChips said:

    I downloaded the SDK. Following the guide posted directly on MCAM's website (6/6/15).

    Is VB-Net not supported anymore? Searching for 'NET HOOKS' or 'MASTERCAM' in VS code's Extensions Manager shows precisely zero results. I need the template extension.

     

    There is no SDK required for the .NET API.

    We only have VS2019 templates for .NET at the moment, we plan to have VS2022 templates soon. If you have both VS versions installed you can create the project in VS2019 then open it in VS2022.

  3. On 4/28/2021 at 12:07 PM, sbowling said:

    So I created the XML file and I go back and do another setup sheet, is still does not have my information.  What do I do with the XML file?

     

    Scan the XML file for the information you need to verify it is there. Once you identify the data you can reference the tag.

  4. NiravP,

    For NET-Hook development there is not additional SDK to install as there is an assembly installed with every seat of Mastercam that you reference in a .NET class library project to gain access to the API.

    If you do not have access to a seat of Mastercam yourself you will need to talk to the client for access or contact [email protected] with your and your clients details and I can pass the information on the the applicable people to help you.

    We do have several project examples on our website under the 3rd Party Developers portal and the [email protected] mailbox is our API support mailbox. We also have developer forums on our website.

  5. On 4/14/2021 at 8:31 PM, sbowling said:

    I am stuck on trying to get the Insert Manufacturer Tool Code to show up on my tool list for a lathe tool.  I get the Holder Manufacturer Tool Code. In the attached picture, "EPICOR" is the holder tool code and the "EDP#" is supposed to be the insert tool code.  Any help would be appreciated.

    Capture.JPG

    You can search the XML file that is created by the tool list call, from the setup sheet dialog hold the CTRL button and left mouse click the green check button to have Mastercam generate a full XML file. The file will be located in your C:\Users\Public\Documents\Shared Mastercam 2022\common\reports\XML folder and you can search the tags. You can also take a look at the report help file and see the tag section.

  6. 37 minutes ago, ThomasF said:

    Mick, could you please check if these files are still there?

    I don't see anything there added after May, 2020.

    Regards

    Thomas

     

    Thomas,

    Make sure to select the drop down to filter out the examples list. FWIW many of the 2017-2020 examples will works just fine in 2021+ other than the ToolNetApi examples which have a couple namespace breaking changes.

     

    image.thumb.png.4647803aa9ae595b3e5437a0b32d240b.png

     

     

  7. 3 hours ago, Thee Byte™ said:

    Maybe it's just me, but the link at the top gives me error 404

    _ _ _ _ _ _ _ _ _ _ _ _ _ 

    Hi Mick, 

    do you think we could have a more in depth Tutorial about making tools with the ToolNetAPI?

    Specifically creating "custom" tools from 3D models.

     

    Thanks!

    👍

    Ah yea that link is no longer valid, I did report the post to update the link as I am unable to edit it. https://my.mastercam.com/Communities/3rd-Party-Developers/NET-Hook-Downloads is the correct link. Thanks for catching that.

    I'll see what I can do with more tool examples.

     

    • Like 1
  8. 2 hours ago, Thee Byte™ said:

    It would be cool to see Mastercam Templates for nethooks in other languages someday..

    C++/Cli / Iron Python / FSharp / Java

    The last two especially are heavily used, if Mastercam would support them we could see a lot more users coming to the platform.

     

    A c or .net interop project with python would also be good because python users would wamt to use actual python.

    We do have a backlog item for a C++/CLI template so that is coming.

  9. 1 hour ago, JAalders said:

    Im looking for a simplified Lathe set up sheet that can fit on one double sided sheet of paper or figure out how to create a custom sheet. Thanks for sharing this link.

    Have you had much succes customizing this your self?

    There is a tutorial from 2018 at https://my.mastercam.com/Learning/Tutorials/Mastercam that walks you through using setup sheets if you haven't seen it. There are also a few threads for setup sheets in our https://kb.mastercam.com/Knowledgebase.aspx just search for 'setup sheets'

  10. On 1/15/2021 at 9:01 AM, ToolanddieGuy said:

    Thanks for the reply. Thats actually the video tutorial I used to create my initial setup sheet. There's no mention in there about how to change the image size. I've reached out to Mastercam technical support, and waiting to hear back.

    Did you ever get an answer to this?

    If not, if you open the image in an image viewer is it actually that small? 

    The image control used in the active reports has a size mode property, by default it is set to Zoom, you could try the Stretch or Clip setting to see if that gives you the view you are looking for.

    • Like 1
  11. 12 hours ago, Thee Byte™ said:

     

    This portion of code creates the libwrap class, I re-use this portion a lot, since this interface is nice than the one you get from .NET.

    Here we are importing directly from The Windows Api

    
      #region Private Methods
            [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
            public class OpenFileName
            {
                public int structSize = 0;
                public IntPtr dlgOwner = IntPtr.Zero;
                public IntPtr instance = IntPtr.Zero;
    
                public String filter = null;
                public String customFilter = null;
                public int maxCustFilter = 0;
                public int filterIndex = 0;
    
                public String file = null;
                public int maxFile = 0;
    
                public String fileTitle = null;
                public int maxFileTitle = 0;
    
                public String initialDir = null;
    
                public String title = null;
    
                public int flags = 0;
                public short fileOffset = 0;
                public short fileExtension = 0;
    
                public String defExt = null;
    
                public IntPtr custData = IntPtr.Zero;
                public IntPtr hook = IntPtr.Zero;
    
                public String templateName = null;
    
                public IntPtr reservedPtr = IntPtr.Zero;
                public int reservedInt = 0;
                public int flagsEx = 0;
            }
    
            public class LibWrap
            {
                //BOOL GetOpenFileName(LPOPENFILENAME lpofn);
    
                [DllImport("Comdlg32.dll", CharSet = CharSet.Auto)]
                public static extern bool GetOpenFileName([In, Out] OpenFileName ofn);
            }

     

    You may want to set these switches to false at first,

    Not sure if you are aware or you are doing this for a specific need there are file open and file save dialogs that are simple to implement.

     

     

     

    filedialog.png

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