I have a tag of a Title Block. I want the values from it from a label

Hey all,

I have managed to write some code to find the tag of a title block. I want to then use this tag get to the values by label. But the tag object doesnt have that function. How do I use that tag to get to the real object?

Thanks,

Jordan

You can use the object manager to get an object from a tag value:

Dim myTObj as TaggedObject
myTObj = Utilities.NXObjectManager.Get(yourTag)

If you know the type of object that will be returned, you can cast then cast it to the specific object type. Alternately, if you know the object type beforehand and you are using "Option Strict Off", you can implicitly cast to the proper object type when you get the object. For instance, if you know the tag represents a face object, you can do the following:

Dim myFaceObj as Face
myFaceObj = Utilities.NXObjectManager.Get(theFaceTag)

Hey,

Thank you, this sounds like it might work. How did you find this in the API? I have been searching for something like this for two days. I haven't been able to find anything like this though and I would like to find them without having to bother this forum every time.

I don't remember the exact source, most likely a GTAC example. GTAC posts a lot of code samples in the solution center.