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:

sebast1985

Verified Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by sebast1985

  1. HI guys, I want to set the view origin of top view I try this code but nothing works Can you help me

    Thanks.

    
    		 Q1:
    	 string EpaiT = Interaction.InputBox("Épaisseur de la pièce en pouce", "V2.", "", -1, -1);
    	 epai = Convert.ToDouble(EpaiT); //conversion texte a numérique
    
    
    
    	 epai = epai * 25.4; //conversion impériale a métrique
    
    
    	 MCView V = SearchManager.GetSystemView(Mastercam.IO.Types.GraphicsViewType.Top);
    
    
    
    	 V.ViewOrigin = new Point3D(0, 0, epai);
    	 V.Commit();
    

  2. I'm not sure if is correct

    public override Mastercam.App.Types.MCamReturn Run(int param)
        {
    	    string lvlname125 = "072 - BEARING 3.18 HOLE";
    	    int LVL = LevelsManager.GetLevelNumber(lvlname125);
    	    if (LVL < 0)
    	    {
    		    bool rest = LevelsManager.SetLevelName(125, lvlname125);
    		    LVL = 125;
    	    }
    
    	    {
    
    
    	    bool res=true;
    	   Point3D pt = new Point3D(0, 0, 0);
    	  res=SelectionManager.AskForPoint("test",PointMask.EndPoint,ref pt);
    
    	  ArcGeometry cir = new ArcGeometry(0, pt, 1.59, 360, 0);
    	  cir.Level = LVL;
    	    cir.Color = 75;
    	    cir.Commit();
    
    
        }
    	    return MCamReturn.EscapeKeyHit;
        }
    

  3. I want to change de arc view number on arc but my code doesn't work.

     

    
    int levell = Mastercam.IO.LevelsManager.GetLevelNumber(lvlnom);
    
    {
     Geometry[] points = SearchManager.GetGeometry(GMASK, smask, levell);
    
     System.Collections.ArrayList drillpoints = new System.Collections.ArrayList();
    
     {
    	 // Donne les cordonné des points selectioné en x y z		
    	 foreach (Mastercam.Curves.ArcGeometry geo in points)
    	 {
    		 geo.ViewNumber = 1;
    
    
    		 DrillPoint dp = new DrillPoint(geo.Data.CenterPoint);
    		 drillpoints.Add(dp);
    	 }
    
    	 op.DrillPoints = drillpoints;
    	 if (op.Commit())
    	 {
    		 if (op.Regenerate())
    		 {
    			 return drillpoints.Count;
    		 }
    

  4. ###############################################################################
    # NETHook function table
    ###############################################################################
    #
    # Name : Drill-auto.ft
    # NETHook : Drill-auto.dll
    # Date : 2014-03
    # Author :
    # Notes :
    # Language : C#
    #
    ###############################################################################
    
    
    ######################
    # ASSIGN A UNIQUE NAME
    ######################
    APPLICATION "Drill-auto"
    
    ######################
    # NETHook LOCATION
    ######################
    #
    # Create a sub folder FOLDER_NAME below the main CHooks folder.
    # Update paths below to match your install path and project name.
    FUNC_DLL "chooks\Drill_auto.dll"
    RES_DLL "chooks\Drill_auto.dll"
    CATEGORY "NeTHook"
    
    ##############################################################################
    # Public functions here
    ##############################################################################
    #
    FUNCTION NET "Run"
    dnSBMP "Run16"
    dnLBMP "Run24"
    dnTIP "RunTip"
    END_FUNCTION
    
    # Add another button command
    FUNCTION NET "RunMsg"
    dnSBMP "Info16"
    dnLBMP "Info24"
    dnTIP "InfoTip"
    END_FUNCTION
    
    
    #
    # EOF
    

     

    I use nethook wizard. When I try to search icon the mastercam sen error message(see attach jpg). Where can I find this file. Thx

    post-29042-0-62495500-1395366196_thumb.jpg

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