#include <uf_defs.h> #include <uf_ui_types.h> #include <uf_drf.h> #include <uf_obj.h> #include <uf_part.h> #include <uf.h> #include <uf_modl.h> #include <uf_ui.h> #include <string.h> #include <uf_object_types.h> #include <uf_ui_types.h>
Set filter
selection0-> GetProperties () -> SetString ( "LabelString", " select Notes"); // set the text selection0-> GetProperties () -> SetString ( "Bitmap", "note"); // Settings icon selection0-> GetProperties () -> SetEnum ( " SelectMode", 1); // multiple select mode // set the filter only selected annotation Selection Selection :: :: = Object SelectionAction SelectionActionClearAndEnableSpecific; STD :: Vector <Selection :: MaskTriple> Masks (. 1 ); Masks [0] = Selection :: MaskTriple (UF_drafting_entity_type, UF_draft_note_subtype, 0); selection0-> GetProperties () -> SetSelectionFilter ( "SelectionFilter", Object, Masks);
UF_initialize (); // object collector controls PropertyList FaceSelectProps * = selection0-> GetProperties (); STD :: Vector <TaggedObject NXOpen :: *> = FaceSelectProps- Notes> GetTaggedObjectVector ( "selectedObjects"); Delete FaceSelectProps; FaceSelectProps = NULL ; // Get string content NXString STR = string0-> GetProperties () -> the GetString ( "the Value"); char CH [133]; strcpy_s (CH, 133, str.GetLocaleText ()); char CP4 [] [133 ] = {0}; strcpy (CP4 [0], CH); IF (! strlen (CH) = NULL) { for (int I = 0; I <notes.size (); I ++) { // change comment uc5566 (notes [i] -> Tag (), 1, 1, cp4); } } else { Uc1601 ( "no entry",. 1); } UF_terminate ();