Code:
using System;
using System.Collections.Generic;
using System.Text;using NXOpen;
using NXOpen.UF;
using NXOpen.Annotations;
using NXOpen.Assemblies;
namespace DeleteOldTitleBlockNotes
{
class Journal
{
static Session theSession;
static UFSession theUFSession;
static UI theUI;
static Part workPart;
public static void Main(string[] args)
{
theSession = Session.GetSession();
theUFSession = UFSession.GetUFSession();
theUI = UI.GetUI();
workPart = theSession.Parts.Work;
////SIMPEL
NXOpen.Features.Feature[] featureArray;
theUI.SelectionManager.SelectFeatures("Feature waehlen...", Selection.SelectionFeatureType.Browsable, out featureArray);
theSession.ListingWindow.Open();
foreach (var item in featureArray)
{
theSession.ListingWindow.WriteLine(item.ToString());
}
//UMFANGREICHER
TaggedObject tagged;
Point3d cursor;
Selection.MaskTriple triple = new Selection.MaskTriple(
UFConstants.UF_datum_plane_type,
UFConstants.UF_all_subtype,
UFConstants.UF_UI_DATUM_PLANE);
theUI.SelectionManager.SelectTaggedObject(
"",
"",
Selection.SelectionScope.AnyInAssembly,
Selection.SelectionAction.ClearAndEnableSpecific,
true,
false,
new Selection.MaskTriple[] { triple },
out tagged,
out cursor);
theSession.ListingWindow.WriteLine(tagged.ToString());
}