How to check if the text of an IndependentTag is question mark?

How to check if the text of an IndependentTag is question mark?

Anonymous
Not applicable
839 Views
8 Replies
Message 1 of 9

How to check if the text of an IndependentTag is question mark?

Anonymous
Not applicable

Anyone knows if there is a way to check if a material tag is valid a not (question mark) through API? Thanks in advance.

question.png

0 Likes
840 Views
8 Replies
Replies (8)
Message 2 of 9

jeremytammik
Autodesk
Autodesk

Install RevitLookup and explore the IndependentTag properties.

 

One of them is TagText:

 

https://www.revitapidocs.com/2020/8e297dee-920d-f620-6198-0bed494e3f04.htm

 

Maybe the question mark is a special case and you need to check some of the other properties as well for it.

 

Please let us know where you find it.

 

Thank you.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 9

Anonymous
Not applicable

Hi Jeremy,

 

Thanks for your reply.

 

I checked that the TagText is always empty whether it is question mark or not. I also checked that the IsOrphaned property is always false. And there is no parameter can be helpful. I've no idea how to do the check now.

0 Likes
Message 4 of 9

jeremytammik
Autodesk
Autodesk

There are many more properties to check, e.g., TaggedElementId etc.

 

Are you using RevitLookup?

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 5 of 9

Anonymous
Not applicable

Yes, I'm using RevitLookup. TaggedElementId, GetTaggedReference also no help. I can't find a property useful for this case.

0 Likes
Message 6 of 9

jeremytammik
Autodesk
Autodesk

What action in the user interface cases the question mark? What can you do in the UI to make it go away? Analyse the results in RevitLookup.



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 7 of 9

jeremytammik
Autodesk
Autodesk

I just by chance happened to notice that this question of yours has already been raised and answered in previous threads here in the forum, e.g.:

  

https://forums.autodesk.com/t5/revit-api-forum/find-unhosted-tags/m-p/9049794

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 8 of 9

Anonymous
Not applicable

This still does not work for me. I attached a sample file. Could you please take a look when you are available? Thanks a lot.

0 Likes
Message 9 of 9

jeremytammik
Autodesk
Autodesk

New workarounds suggested in the thread on Material Tag created by API does not show material data:

 

https://forums.autodesk.com/t5/revit-api-forum/material-tag-created-by-api-does-not-show-material-da...

 

Can you try them out please, and let us know whether they work for you?

 

Thank you!

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes