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:

Karl@CP PISTONS

Verified Members
  • Posts

    300
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Karl@CP PISTONS

  1. Yes my FT file looks similar ( also similar to existing .net ft files i.e. atp.ft which DOES show in the all commands list ) here is in entirety:

    ###############################################################################
    # NET-Hook function table            
    ###############################################################################
    #
    # Name        : UHM_Open.ft
    # NETHook     : UHM_Open.dll
    # Date        : 
    # Author    :  K Stickel
    # Notes        : Rename all YOUR_NETHOOK with the name of this project
    # Language    : VB.NET
    #
    ###############################################################################


    #######################################
    # ASSIGN A UNIQUE NAME FOR THIS NETHOOK
    #######################################
    APPLICATION "UHM_Open"

    ######################
    # NET-Hook PATHS
    ######################
    #
    # Update paths below to match your install path and project name.
    # you can use folders if you wish to have your NETHook in a CHooks sub folder
    # just make sure to edit this path to match.
    FUNC_DLL   "CHOOKS\UHM_Open.dll"
    RES_DLL    "SAME"
    dnRES_NAME "UHM_Open.NETHook"
    CATEGORY   "CP-Custom"

    ##############################################################################
    # Public functions here
    ##############################################################################
    #
    # The main system entry point
    FUNCTION NET "Run"
        dnSPNG "Run16"
        dnLPNG "Run24"
        dnTIP  "UHM Open"
    END_FUNCTION

    #
    # EOF
     

  2. Is there a way using the script engine to search for a file in multiple directories?  I have this working in the script:

    Set FileList = CreateObject("System.Collections.ArrayList")
    If FSO.FileExists(Directory & JobNumber & ".MCAM") Then '// File found
        FileList.add (Directory & JobNumber & ".MCAM")
    End If

    But I really need it to search the sub folders and return all the files found. Is this possible?

     

    Thanks in advance.

  3. I did a complete uninstall including manually removing the shared directory and the program files folder ( both kept after uninstall for some reason ). Fresh install including 2 updates after installation still have no way to add machines to the list...... Lots of machines in the folder just none in the machine manager list. I cut and pasted the paths to make sure I was in the correct folder so have no idea what's  going on. 

    Anyone have any more suggestions?

    Machine_List.JPG

  4. Anybody have a workaround for 2019 not allowing me to add machines to the machine list? When I go to manage list it only shows the default machines. See attached screen shots as  there are many machines in the folder but they do not show allowing me to add them.

    This is the second install that has done this.

    Thanks

    Machine_Folder.JPG

    Machine_List.JPG

  5. Anybody have a workaround for 2019 not allowing me to add machines to the machine list? When I go to manage list it only shows the default machines. See attached screen shots as  there are many machines in the folder but they do not show allowing me to add them.

    This is the second install that has done this.

    Thanks

    Machine_Folder.JPG

    Machine_List.JPG

  6. I have ran into something that is puzzling me with this project. 

    It seems that the Application to be run ( as found in the ft file ) is case sensitive and that the app name does not always match the DLL name with regards to the case.

    As of now  now the list is populated with the .DLL file name as found in the c-hook folder. If the application name exactly matches the dll file name then all works as it should.

    If that's is true my workaround would be to create a collection of the *.FT files then parse each one for the application name. This name would feed the menu list  to fire the correct application.

    This seems like a convoluted way to accomplish this task. Am I on the right path or is there a better / different way to get a list of all the Application Names from all the FT files in the c-hook directory?

  7. Thanks for the prompt replies

    Colin, I think at this time that it is important to have the scripts  run from within the c-hook. The ultimate goal of the app is to  check the user name and display a set of scripts / c-hooks depending on the user.

     

    Roger, I'll have to play with this, I thought the application was always MasterCam but seems it can be any valid DLL that has a valid FT file. Is this correct?

  8. Yea,  I've had some free time to work on this. So the next question I have is how to run an existing C-hook (.dll) file from within the menu c-hook. I have all the scripts and c-hooks from a custom folder displayed in a window. The scripts run when double clicked or selected and run button clicked. I looked at the ExternalAppsManager and found the postFT/RunFT but do not know how to feed it the program to run ( assuming this is even close to the right path ).

  9. Hi, Can anyone help me figure out why this code is failing with error:

    Dim pt As New PointGeometry(New Point3D(Spline.EndPoint1))

    Object Browser shows that the endpoint1 should return a point3d  -  Public Overrides ReadOnly Property EndPoint1 As Mastercam.Math.Point3D)

     

    This is in Mastercam 2018 

    Error is:

    Overload resolution failed because no accessible 'New' accepts this number of arguments.

     

     

  10. I've been asked to look over the specs for a new lathe for our shop we may get. I've never used a Doosan Lathe so am looking for input as to reliability , rigidity etc... Has a standard fanuc control so that part should be ok. We will be getting the dual spindle + live tooling  LYNX 2100 series . Anybody here have experience with  these machines?

    Any inputs are welcome.

    Thanks

  11. Hello All,

         I've been asked to research the pros and cons of adding a coolant driven mill spindle on one of our lathes. Does anyone here use these? The first question I had is are they reliable  or does coolant dissolve everything? 

    Any advise is welcome.

     

    Thanks

    Karl

  12. Thanks for the reply Mick, Here is the basic portion of the script that I'm running. We have a lot of little scripts that we run so I was trying to create a simple menu system where the user simply selects a script from a list box, the the script runs and the c-hook exits. Like you mentioned if script does not need the user it all works fine. I might use this as a reason to play more with the .Net and have the list box filled with VBS and/or Chooks with out the user needing to know which is which. Most of the script are very simple so maybe convert them all to c-hooks. Like all of our projects here the only limit is time.

    Any pointers that could help would be helpful as I am very new to this C-Hook stuff

     Call GetChain ("Select Edge Curves for Pin Boss Milling.") '// prepare to change attributes
        '// Loop thru selected curves and set attribs
            
            Do 
                Call SetEntityColor (NewColor)
                Call SetEntityLevel (NewLevel)
                '//SetEntityStyle(NewStyle)
                
                bRet = MoveForwardOnChain()
                    If bret = false then 
                        bret = MoveToNextChain
                    End if
                
            Loop While bRet
             
            FreeChains()

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