I think the nearest you'll get to this is similar to how tags with differing font sizes are dealt with.
If you know you'll only be using certain colours then you can create the different label types in the tag family to represent the different colours. You would then for each of the three original tag positions overlap the different colour labels and control the visibility of them via a yes/no parameter. Likely would have to be an instance parameter otherwise you would need to create a type for every colour permutation.
Problem with the API is you can only change colour by category (which will be for every tag) or by element (which will be for everything within the tag).
If you are placing the tags as part of the program then you can place three tags and override their colours but not one tag and then change the colour of three parts within it. You'll have no access to tag internal elements unless you want to create the tag family at run time and have a myriad of tag families with differing internal colour combinations.
Hi RPThomas,
Thanks for thorough explanation.
It seconds what i've found. Also this means i've hit a real wall there For my particular case i think we'll be able to go around the limitations.
I believe, a systematic better api support for handling colors would be very useful.
Thanks again.
Best regards,
Kinjal.
Dear Kinjal and RPThomas,
Thank you for your query and helpful explanation.
If you wish to describe exactly how you think a better API support for handling colours would be useful and how it should look, I would suggest you submit a wish for it in the Revit Idea Station.
However, remember that the Revit API basically just mirrors the functionality and paradigms of the user interface...
Best regards,
Jeremy
Hi Jeremy,
a new ParameterType.Color would help here, but how to handle that in formulas etc., how to express and display the value...?
Color parameters are of type "integer", but the raw value may be difficult to read for the user:
https://forums.autodesk.com/t5/revit-api-forum/how-to-change-text-color/td-p/2567672
Cheers,
Rudi
Hi Jeremy, Rudi,
Sure, i'll write a use-case for Idea station.
Nice thread, Rudi. Yes, new parameter type can help and so would support for some color-functions in formula (probably that's but too much to ask though).
But at least parameter type, and possibility to just link colors (in my case label color) with family/shared parameters via formula would be a great addition.
Best regards,
Kinjal.
Can't find what you're looking for? Ask the community or share your knowledge.