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.
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
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);
}
}
}