Access line weight for dimension lines

Access line weight for dimension lines

ritesh.solankeSKPPH
Enthusiast Enthusiast
547 Views
2 Replies
Message 1 of 3

Access line weight for dimension lines

ritesh.solankeSKPPH
Enthusiast
Enthusiast

I want to access dimension line's line weight and even end points for the witness lines programmatically.i have attached a screenshot of what exactly I want.

Thanks.DimensionLines.png

0 Likes
548 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk

Before you do anything else whatsoever, install RevitLookup:

 

https://github.com/jeremytammik/RevitLookup

 

It is an interactive Revit BIM database exploration tool to view and navigate element properties and relationships.

 

Use that to discover the relationships between the dimension lines, their styles and the properties you are looking for.

 

Cheers,

 

Jeremy

 



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

0 Likes
Message 3 of 3

BardiaJahan
Advocate
Advocate

As Jeremy said, RevitLookup is a useful tool to find the relationship between elements. etc.

For the line weight you can get BuiltInParameter.LINE_PEN from the dimension type:

 

ElementId dimTypeId = dimension.GetTypeId();
Element dimType = document.GetElement(dimTypeId);
Paramater lineWeight = dimType.get_Parameter(BuiltInParameter.LINE_PEN);