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:

eltklas

Verified Members
  • Posts

    117
  • Joined

  • Last visited

Posts posted by eltklas

  1. I'm checking that this forum has little movement.

    There are several unanswered questions of mine. I imagine the same thing would happen with this one, but just in case here's the question.

    Is there a way to create groups or lists of entities (arcs, lines, points...) and be able to call them to use them when needed? in case I want to move or copy them.

    Thank you all for the answers.

  2. I have found this in C# documentation:

    Mastercam.Support.UI.MastercamRibbon.InsertThirdPartyRibbonTabs(string);

    String is a ribbonXml file. The XML that defines the Tab and its contents.  Can someone give information on how this file is created or where to look for that information? In the examples there is one but there is only one XML file and it is not explained. Can someone explain it ?

    Thanks

  3. I want to select a chain, make offset of it, change the color to result and translate in Z, ut with the following code what istranslated is the original chain and not the offset one.

    Can you help me please

    Why the translated is the original chain?

    Can I change the settings of the selecction to always select a clockwise chain?

    How can I know the nurber assigned to colors?

    Thanks

     

     

    ///code used for the C# C-Hook

      //Select a chain
      var CadOriginal = ChainManager.GetOneChain("Select a Closed Chain.\n\n");

      //only continue if it is a closed chain
      do 
          if (CadOriginal.IsClosed == false)
          {
              //If not closed, show message and reselect
              MessageBox.Show("The chain is not Closed", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
              CadOriginal = ChainManager.GetOneChain("Select a Closed Chain.\n\n");
          }
      while (CadOriginal.IsClosed == false);

      //offset chain
      var CadTemp1 = CadOriginal.OffsetChain2D(OffsetSideType.Left, 0.2, OffsetRollCornerType.None, 0, false, 0.005, true);
      //convert to geometries the chain   
      var CadDef1 = ChainManager.GetGeometryInChain(CadTemp1);

     
      //point origin
      var origin = new Point3D(0, 0, 0);
      //point to transalate
      var PuntoZ = new Point3D(0, 0, 14.8);
          
      //using the chains
      foreach (var Chain in CadDef1)
      {
          //change color
          Chain.Color = 9;
          //translate
          Chain.Translate(origin, PuntoZ, ViewManager.CPlane, ViewManager.CPlane);
          //validate
          Chain.Validate();
          Chain.Commit();
      }

  4. On 6/24/2004 at 6:34 PM, Girus said:

    Here is a quick and dirty routine that I created to handle this. It does not have all of the protection code that I would like to see.

     

     

     

    code:

    static void make_manual_entry( 

     

    char *szString ){

     

     

     

     

     

    boolean succf;

     

    operation op_me_note; // manual entry operation.

     

    db_ptr_type d_ptr;

     

     

     

     

     

     

     

    memset( &op_me_note,0,sizeof(operation));

     

    //op_me_note.op_idn = 1;

     

    //op_me_note.slot = 1;

     

    op_me_note.opcode = TP_MANUAL_ENTRY;

     

     

     

    operation_manager (

     

    &op_me_note, // IO: pointer to operation

     

    OPMGR_INIT, // I: OPMGR_ADD, OPMGR_EDIT, etc

     

    &d_ptr, // O: db pointer to operation entity

     

    &succf); // O: operation manager successfull

     

     

     

    // the following operation is necessary because when a second call to

     

    // opereation_manager is made with the OPMGR_INIT it atomatically picks up the

     

    // previous manual entry text. And if the current text has shorter text it will

     

    // end up over the old text and part of the old text will still show in the NC code.

     

    memset( &op_me_note.u.manual_entry.comment,0,sizeof(op_me_note.u.manual_entry.comment));

     

     

     

     

     

    strncpy (op_me_note.u.manual_entry.comment, szString, strlen(szString));

     

    op_me_note.u.manual_entry.source = 0;

     

    op_me_note.u.manual_entry.save = 0;

     

    op_me_note.u.manual_entry.gcode = 1006;

     

     

     

     

     

    operation_manager (

     

    &op_me_note, // IO: pointer to operation

     

    OPMGR_ADD, // I: OPMGR_ADD, OPMGR_EDIT, etc

     

    &d_ptr, // O: db pointer to operation entity

     

    &succf); // O: operation manager successfull

     

     

     

    }

    I placed this here for anyone who may want to do something similar.

     

    Girus

    Hello, I am searching to create a Manual Entry Operation. I have tried this code and it doesnt work, Is it for C# or C++.

    I am using C# and I need the code for create a Manual entry Operation.

    Can you help me. Peease.

  5. I want to create a new Manual Entry operation with only text to insrt in the NC, I'am using C#, can you help me to create one?

    I am tryng but my Mastercam sdk level not is good, I,m starting. If you help me I will be grateful. 

    There should be a book or some information with examples of each part of the SDK, the examples only come with very few things.

    Thank you

     

  6. I'm starting with chooks so I'm very lost. I have downloaded the examples but I can't do what I want. I can now go through all the operations, detect which are drills, but I don't know how to access the drill type (position in the list of drills) and if it can be changed.

    Another problem is that I have two forms and I cannot call the second form from the first and return to it when I finish what I do.
    Thanks and greetings

  7. I want to learn to do that type of scripts, Do you have any information to read about?. I searched but I didn`t find nothing about that.

    I program in Visual Studio with Visual Basic .Net

    I think it is really good option to customize the program

    Good Job

     

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