Showing results for 
Search instead for 
Do you mean 

Obtaining tabular notes

Hello everyone!


How can I obtain all tabular notes in a prt, and then obtain all their cells? The idea is to cycle through all tabular notes and clear their cell contents based on some criteria.


Re: Obtaining tabular notes

preferred language & version?


method using legacy calls / tags in C++


	// now get all tabular notes
	tag_t	tThisTabNote = NULL_TAG;
	std::vector<tag_t>	vecTabnotes;
	char	TabNoteName[UF_OBJ_NAME_LEN+1];
	while (!UF_CALL(UF_OBJ_cycle_objs_in_part(tWP, UF_tabular_note_type, &tThisTabNote)) &&
			(tThisTabNote != NULL_TAG))
		UF_OBJ_ask_name(tThisTabNote, TabNoteName);
		// etc.
Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled

Re: Obtaining tabular notes

I can only use C#. Man Happy The version in question is NX 8.5.

Re: Obtaining tabular notes

[ Edited ]

There is no UF_tabular_note_type in .NET API. I tried to use UFConstants.UF_table_type, but it does not obtain any tabular notes. I'm a bit confused at the moment.


UPDATE: I apologise. There IS tabular_note_type in .NET API. Man Very Happy

Re: Obtaining tabular notes

[ Edited ]

It basically works, but it returns ridiculous amount of tags, many more than there are tables in a file. Even if table is only one, tags are many. I'm not getting it. Any ideas?

Also how is it possible to obtain cells? I tried UFConstants.UF_tabular_note_cell_subtype, but it returns nothing. Perhaps I'm miusing it? It is subtype, not type. I'm not sure how to use it correctly.

Re: Obtaining tabular notes

First, the thing you see on the screen is not a Tabular Note.  It is a Tabular Note Section.


Think of the Tabular Note itself as an invisible container that may contain any number of Sections.  That's not a perfect analogy, but it works pretty well.


You can find the cells within the context of the Row and Column.  So you would need several functions, if you wanted to find all of the cells.  Here are some of them, in the original Open C - I think these are all wrapped for use in .Net:


UF_TABNOT_ask_nm_rows and UF_TABNOT_ask_nm_columns - variants of both of these exist with "_in_section" appended to the name.


Then you can find each row or column with UF_TABNOT_ask_nth_row or UF_TABNOT_ask_nth_column.


Then for an indivdual cell, you can use UF_TABNOT_ask_cell_at_row_col.


As with any of the wrapped methods, it is a good idea to find the original Open C method in the Open C Reference Guide in the docs - the .Net docs for wrapper calls are pretty sparse.


Backing up to the bit about finding the note in the first place, you'll need to screen with both the type and the subtype.  So if you are cycling, go ahead and cycle for objects of type UFConstants.UF_tabular_note_type, then for each one you find, ask whether it is of the subtype UFConstants.UF_tabular_not_subtype.  Ignore the others.



Re: Obtaining tabular notes

How to ask whether it is of the subtype UFConstants.UF_tabular_note_subtype?

I'm not an NX Open expert at all (yet). Do you have an example code?

Re: Obtaining tabular notes

In C#, it would look something like this:


theUfSession.Obj.AskTypeAndSubtype(yourObjectTag, out type, out subType);


The original method is UF_OBJ_ask_type_and_subtype().


We don't have a good example that does all of this at once, but we have many examples online in the Solution Center that you could look at for hints.  I only see one in C# that deals with tabular notes, but there are quite a few in VB and in Open C.  We can't really create these on demand, but I'll put it on my list of things that would be helpful, and when I have the time, I'll create one and post it.


If you don't already know how to find the examples on the Solution Center, let me know and I'll post the (simple) directions. 

Re: Obtaining tabular notes

Thank you! I will now try to implement your hints.


I know pretty well about the Solution Center and found many priceless information there, so thanks again! 

Re: Obtaining tabular notes

How to retrieve the tabular note section data ? Im still confused as nothing is coming up ..