Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Revit API label get refered parameter

18 REPLIES 18
SOLVED
Reply
Message 1 of 19
C.Kellner
4024 Views, 18 Replies

Revit API label get refered parameter

Hey there. Is there a way to get the refered parameters of a label. Using the GUI the user can choose the parameter that should be used in context but how can I get or set the refered parameter using the API? I search for a way to get the actual parameter value that is shown in the placed label family instance. I get an exampel value in the family editor but not the refered parameter orion parameter value. Can anyone help me ?! Tanks.
18 REPLIES 18
Message 2 of 19

If you're talking about the family parameter (defined on the family symbol, not the family instance), then you get it using the Symbol property of the FamilyInstance object, then read the parameters there.

Please let me know if that is not what you're looking for.
Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
Message 3 of 19
C.Kellner
in reply to: C.Kellner

I know about this. There is a parameter called label (built in parameter Tag_Tag). This parameter has the storage type none. The user can call a dialog via GUI for referring the parameters that should be used for getting the values in the label in project. But how can I look for the selected parameters via API?
Tags (1)
Message 4 of 19
mikako_harada
in reply to: C.Kellner

Hi Christian, 

 

Could you add an snapshot of values you are trying to access?  It might help us understand what you are looking at.  Thank you. 


Mikako Harada
Developer Technical Services
Message 5 of 19
C.Kellner
in reply to: mikako_harada

Here is a document that descripe the problem.

Tags (1)
Message 6 of 19
mikako_harada
in reply to: C.Kellner

Hi Christian, 

 

Thank you for the additional info.  If I understand correctly, in this context, you are trying to access the room number which a room tag is picking up?  

If so, it is an instance level informtion and it's in the Revit project side as oppose to a family document.  

 

From the RoomTag, there is a property called Room (i.e., the tag is associated with the room).  Room has a property called Number, which allows get/set. i.e., 

 

RoomTag >> Room >> Number. 

 

Does this answer your question?  

 


Mikako Harada
Developer Technical Services
Message 7 of 19
C.Kellner
in reply to: mikako_harada

Thank you for the answer. I know that the parameters could be called in project. But how could I find out that my TextElement (Labels) referres to the room number. I know the example value but not the referred parameter. Is there not a way to get this one?

 

I can get all project parameters but this my problem is that I don't know witch parameters are used in TextElement (Labels).

 

The room tag is one example. If you look into my screenshots than the question is for example what parameter provides the value 16.65 m. is it  a height, a length or the scope. I could read out the values but not the parameters that provide the values because I don't get them via API.

Message 8 of 19
C.Kellner
in reply to: C.Kellner

An other problem is that I have access to the TextElement of a Tag Element when I open the family and in this case I lost the project specific value entries. Is there a way to match this infomations (get the used TextElements of a family and the project specific parameter values)? I have not found a way!

Message 9 of 19
mikako_harada
in reply to: C.Kellner

Hi Christian,

 

Could you add a minimum rvt sample which shows your label?  Maybe we are looking at different element.  

 

room tag is RoomTag class.  TextElement might be in rfa defining RoomTag family.

 

Thank you.


Mikako Harada
Developer Technical Services
Message 10 of 19
C.Kellner
in reply to: mikako_harada

Hi Mikako, 

 

I have added an example with door and wall tags.  The wall Tag has different grouped TextElements in the family. How can I get the parameter references and select the textElement that referres to the "Comments" parameter for example?! I could get the example Value "Dies ist ein Beispielkommentar (This is an example comment)" but not the parameter.

 

The same question could be ask for all other tag types too.

 

I hope the added file helps !?!

Tags (1)
Message 11 of 19
mikako_harada
in reply to: C.Kellner

Hi Kristian, 

 

First, thanks for the rvt file.  Let's try once again.  Hopefully we are on the same page this time. 

 

I looked at the wall tag family.  There are four groups.  One of them has "Kommentar", which I believe you are refering as "Comments".  (I displaced some of groups here as everything was on the same location and I couldn't read it.)  

 

1 textElementInFamily.png

 

Type parameters has Kommentar, which is yes/no property.   

 

In the Revit project file, it shows as a family parameter:  

 

 

2 tagInRvt.png

 

When you pick up a wall tag instance in the revit project, it is an IndependentTag.  

IndependingTag has a objectType property, which allows you to access family type.  

FamilyType (or FamilySymbol) has parameters, which list type parameters. One of them is Kommentar.  It's value is 1/0 (yes/no).  

 

3 tagInRvt_Snoop.png

 

How does this sound 🙂   Is this what you are looking for?   


Mikako Harada
Developer Technical Services
Message 12 of 19
C.Kellner
in reply to: mikako_harada

Hi Mikako,

 

that the type parameter of the FamilyType hat the yes/no parameter "Kommentar" was random (This parameter was used to show the TextElements, the name could be rename [f.e. showComments] ). It is one parameter that creates the user and it need not to have the same name as the parameter that is shown in TextElement, so it does not referres everytime to the correct parameter.

 

MappingTable.png

 

I think you answer my question when you tell me there this dialog gets the parameter name in the mapping table above from? The pre- and postfixes and the example texts are random but the parameter Name could be used for referring to the current used parameter. When you close this dialog and open it again the setted parameters where shown, so the reference is saved. But where is it saved and could I get or set the parameter via API?

 

Message 13 of 19
Revitalizer
in reply to: mikako_harada

Hi Mikako and Augusto,

 

Christian already asked this question in the API forum:

https://forums.autodesk.com/t5/revit-api/setting-the-label-parameter-of-textelements-via-api/td-p/57...

 

As for all params of StorageType.Invalid, there is no access to it since there is a whole data structure that cannot be represented by just one of the simple data types.

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 14 of 19
C.Kellner
in reply to: Revitalizer

So I have not access to this parameter at this time! Would this be changed in future?

Message 15 of 19
Revitalizer
in reply to: C.Kellner

Hello Christian,

 

I don't know, I'm not an Autodesk employee.

 

Nonetheless, I don't think this parameter/label relation will be accessible in the next version.

 

On the other hand, we see that there is a huge request for a new text editor.

I think the two topics (labels and textnotes) are closely relative to each other,

so perhaps Autodesk may improve both of them in the same time.

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 16 of 19
mikako_harada
in reply to: Revitalizer

Thank you Revitalizer! 

 

Christian, 

 

Yes, the last picture tells what data you are looking for.

 

If you want  to log wish, please provide the detailed use case senario so that our product team can understand it.  

 

Thank you.  


Mikako Harada
Developer Technical Services
Message 17 of 19
C.Kellner
in reply to: mikako_harada

Hi Mikako,

 

here is a detailed use case scenario and my wishlist.

 

Let me know when you need further information.

Message 18 of 19
damian.szyjka
in reply to: C.Kellner

Hi All,

 

Is there any news about Label Parameters?

Message 19 of 19
chandikajain
in reply to: C.Kellner

Hi ,

Please let me know, Can i set value of parameter when the parameter are read only and user modifiable(Both Are true) in RVT  ?

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community