Accessing Revit lineweights

Accessing Revit lineweights

helengorina7713
Contributor Contributor
3,175 Views
5 Replies
Message 1 of 6

Accessing Revit lineweights

helengorina7713
Contributor
Contributor

I am trying to access Lineweights settings to be able to report and compare them between different files.
This is very important when determining compatibility of the content (drafting views, loadable content) created in one system versus another. Also useful for template maintenance and rebuilding.
Thanks

 

0 Likes
Accepted solutions (1)
3,176 Views
5 Replies
Replies (5)
Message 2 of 6

jeremytammik
Autodesk
Autodesk

Dear Helena,

Thank you for your query.

 

You need to use a filtered element collector to programmatically retrieve Revit database elements.

If you are unclear about what that is, please refer to the Revit API getting started material:

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#2

 

To determine how to identify the elements you are after, please install RevitLookup and use that to explore your Revit database:

 

https://github.com/jeremytammik/RevitLookup

 

That will provide you with a user interface that uses the Revit API to show you how they can be programmatically retrieved and explored.

 

For some more detailed background information specifically on line styles, please refer to The Building Coder discussion on creating a new line style:

 

http://thebuildingcoder.typepad.com/blog/2016/10/how-to-create-a-new-line-style.html#6

 

The code demonstrating that is part of The Building Coder samples:

 

https://github.com/jeremytammik/the_building_coder_samples

 

I hope this helps.

Best regards,

 Jeremy

 

 



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

0 Likes
Message 3 of 6

helengorina7713
Contributor
Contributor

Dear Jeremy,

 

Perhaps I did not explain my task properly: I have all I need about linestyles and line patterns, that was never a problem. 
I need to get a setting for lineweights: 
looked everywhere using Revit lookup and also came across the posting in your blog about making linetypes. 
 what I need is actually these settings: for Model line weights at different scales and Annotative line weights
Image 2.png

I tried to retrieve them similarly to the line pattern definitions(that works fine), but the only setting I can find is for exporting lineweights, not for reading internal Revit setting.Image 4.png

Many thanks for your help.

 

0 Likes
Message 4 of 6

helengorina7713
Contributor
Contributor

Dear Jeremy,

Any word on accessing lineweight values?

 

Many thanks

Helen

 

 

0 Likes
Message 5 of 6

lionel.kai
Advisor
Advisor
Accepted solution

This is a known issue (CF-3772, according to @eric.anastas). See also the Revit Idea: access Line Weights (settings) from Dynamo and/or Revit API. Posting on Known Change Requests as well.


Lionel J. Camara
BIM Manager at KAI Hawaii, Inc. - Structural and Forensic Engineers
Autodesk Certified Professional
Message 6 of 6

helengorina7713
Contributor
Contributor

Thanks for your response. it is better to know that it is not possible than waste so much time trying to find the solution.
I have up-voted feature request


@lionel.kaiwrote:

This is a known issue (CF-3772, according to @eric.anastas). See also the Revit Idea: access Line Weights (settings) from Dynamo and/or Revit API. Posting on Known Change Requests as well.