How to change a model line color, not its representation in a specific view?

How to change a model line color, not its representation in a specific view?

stefanome
Collaborator Collaborator
1,720 Views
2 Replies
Message 1 of 3

How to change a model line color, not its representation in a specific view?

stefanome
Collaborator
Collaborator

I have a function that creates groups with model lines and uses OverrideGraphicSettings to set their color, just like CmdChangeElementColor does.

 

If I run the function on a 3D view, then run it again on another 3D view, and I end up with 2 groups.

The first group is colored in the first view and green in the second.

The second group is green in the first view and colored in the second.

 

Is it possible to set the color of a model line, not of its representation in a specific view?

0 Likes
Accepted solutions (1)
1,721 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni
Accepted solution

There are an awful lot of ways to control colour and graphic appearance in general. 

 

Does a model line (or any other Revit element) ever even have an intrinsic colour of its own? I would tend to doubt that.

 

Anyway, here is what I have collected so far about controlling element colour:

 

https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.24

 

I hope this helps.

 

Cheers,

 

Jeremy

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 3

stefanome
Collaborator
Collaborator

Thanks, that page with the list of articles grouped by topic is veeeeery useful!!!

0 Likes