×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

journal identify action button

journal identify action button

journal identify action button

(OP)
Hi there,

I was wondering if the action of hitting a menu button, can be identified in code instead of having a commentary?

"// Menu: Insert->Sketch Curve->Circle..."?

public static void Main(string[] args)
{
Session theSession = Session.GetSession();
Part workPart = theSession.Parts.Work;
Part displayPart = theSession.Parts.Display;
// ----------------------------------------------
// Menu: Insert->Sketch Curve->Circle...
// ----------------------------------------------

NXOpen.Session.UndoMarkId markId1;
markId1 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Profile short list");

NXOpen.Session.UndoMarkId markId2;
markId2 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Curve");


Thank you in advance,
Z.

RE: journal identify action button

(OP)
Perhaps need to clarify things by saying action button;

The idea is to create a custom toolbar.exe which will have some menus existing already in UGS NX (e;g like sketch, colour palette etc.).
Is that possible? I do know the path making custom menus and toolbars (.men .tlr) but this time using journals NX Open I want to make it an .exe so I can incorporate additional code.

Please see code below,

Any help appreciated,
Z.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using NXOpen;
using NXOpen.UF;
using NXOpen.UIStyler;
using System.Threading;
using System.IO;

namespace projectx78
{
public partial class toolbar_form : Form
{
public NXOpen.UI theUI = NXOpen.UI.GetUI();
public Session theSession = Session.GetSession();
public UFSession theUfSession = UFSession.GetUFSession();
//public NXOpen.Session.UndoMarkId Id2;

public int nErrs1;
public DisplayModification displayModification1;

public static class coder
{}
public static class Common
{}
public toolbar_form()
{
InitializeComponent();
}

private void sketch_sth_Click(object sender, EventArgs e)
{

Part workPart = theSession.Parts.Work;
Part displayPart = theSession.Parts.Display;

NXOpen.Session.UndoMarkId markId1;
NXOpen.Session.UndoMarkId markId2;

markId1 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Profile short list");
markId2 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Create Rectangle");
theSession.SetUndoMarkVisibility(markId2, "Create Rectangle", NXOpen.Session.MarkVisibility.Visible);

}
}
}

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources