Create a grid with text color.

Create a grid with text color.

sizy458
Advocate Advocate
646 Views
4 Replies
Message 1 of 5

Create a grid with text color.

sizy458
Advocate
Advocate

Hello,

 

I would like to create in Dotnet in the Revit document a "Grid" 'Autodesk.Revit.DB.Grid'
with color of the text of the bubble set.

 

How do i do ?

 

Thank.

0 Likes
647 Views
4 Replies
Replies (4)
Message 2 of 5

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @sizy458 ,

You create a grid and use OverrideGraphicSettings to change the color of the grid.

Grid G=Grid.Create(doc,Line);
ElementId eid = G.Id;
OverrideGraphicSettings ORGS = new OverrideGraphicSettings();
Color c = new Color(redValue,greenValue,blueValue);
ORGS.SetProjectionLineColor(c);
doc.ActiveView.SetElementOverrides(eid, ORGS);

I hope this helps.

 

 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 5

sizy458
Advocate
Advocate

Yes,

But how fix for text color ?

0 Likes
Message 4 of 5

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @sizy458 ,

 I am checking with the development team for you.

 Have you tried to achieve the same functionality via UI?

If it is possible via UI then it is also possible via API.

 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 5 of 5

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @sizy458 ,

Have you tried to achieve the same functionality via UI?

I don't think you can do just the name in the UI.

Generally, the API doesn't have more functionality than the UI.

 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes