×
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

How to create reference sets(Name: MODEL)for all the assemblies, sub-assemblies and parts in NX7.5?

How to create reference sets(Name: MODEL)for all the assemblies, sub-assemblies and parts in NX7.5?

How to create reference sets(Name: MODEL)for all the assemblies, sub-assemblies and parts in NX7.5?

(OP)
Please help me with a journal to create reference sets in the name "MODEL" for all the assemblies , sub-assemblies and components in NX-7.5.

RE: How to create reference sets(Name: MODEL)for all the assemblies, sub-assemblies and parts in NX7.5?

Load all components fully and use the following code.

using System;
using NXOpen;

public class NXJournal
{
public static void Main(string[] args)
{
Session theSession = Session.GetSession();
Part workPart = theSession.Parts.Work;
Part displayPart = theSession.Parts.Display;
// ----------------------------------------------
// Menu: Format->Reference Sets...
// ----------------------------------------------
foreach (var eachPart in theSession.Parts.ToArray())
{
Session.UndoMarkId markId4 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Visible, "Edit Name of Reference Set");
ReferenceSet referenceSet1 = eachPart.CreateReferenceSet();
referenceSet1.SetName("MODEL");
int nErrs2 = theSession.UpdateManager.DoUpdate(markId4);
theSession.DeleteUndoMarksUpToMark(markId4, null, false);
}
// ----------------------------------------------
// Menu: Tools->Journal->Stop Recording
// ----------------------------------------------

}
public static int GetUnloadOption(string dummy) { return (int)Session.LibraryUnloadOption.Immediately; }
}


Mukundh

RE: How to create reference sets(Name: MODEL)for all the assemblies, sub-assemblies and parts in NX7.5?

Except that it's generally not recommended that you create Reference Sets in an Assembly file.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

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