Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API Access to Linework Tool?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
mfleming.stantec
1767 Views, 2 Replies

API Access to Linework Tool?

Hi,

 

I'm looking to build a very simple tool that will reset all linework done it the current view.

The Linework command under modify is what I'm referring to.

 

Looking at the API.chm, Linework is part of the PostableCommand Enumeration.

 

Anyone have examples on how one would use this?

 

I'm thinking I would have to use some kind of PickLine function to pick all the lines in the current view, then change the override back to "ByCategory" to "reset" the view.

 

Matt

2 REPLIES 2
Message 2 of 3

Dear Matt,

 

Thank you for your query.

 

If you use PostCommand to launch a built-in Revit command, it will always run the full command with its normal user interface, afaik.

 

In other words, there is no way that I am aware of to specify what elements it should process and exactly what to do with them.

 

The built-in command will prompt the user for that information in its normal fashion.

 

Another approach might be to analyse exactly what database changes are made by the original linework command, and reset those specifically to their default state.

 

I have described how to analyse the 'before' and 'after' states a couple of times:

 

http://thebuildingcoder.typepad.com/blog/2017/01/virtues-of-reproduction-research-mep-settings-ontol...

 

I find BipChecker and the element lister especially useful for this task.

 

I hope this helps.

 

Best regards,

 

Jeremy



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

Message 3 of 3

I posted an Idea for this requested functionality here:

 

API access to Linework tool (get and set edge/line overrides) - Autodesk Community


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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community