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: 

Linework Command Overrides

5 REPLIES 5
Reply
Message 1 of 6
BobbyC.Jones
875 Views, 5 Replies

Linework Command Overrides

Is there a way to get and set line style overrides created with the Linework tool?  Thanks.

--
Bobby C. Jones
5 REPLIES 5
Message 2 of 6
Katsuaki.T
in reply to: BobbyC.Jones

You can get/set graphic overrides for an element in the view using View.GetElementOverrides and View.SetElementOverrides methods respectively. However, there is no API to control linework of individual edges of the element as Linework tool allows.

Katsuaki Takamizawa
Technical Support Specialist
Message 3 of 6
Katsuaki.T
in reply to: BobbyC.Jones

Unfortunately there seems to be no way to carry over overrides applied by Linework tool to a new view. I tried PostCommand method as following. But CanPostCommand method returns ‘false’. Strangely, it works for creating a dependent view by passing the commad id ID_CREATE_DEPENDENT_VIEW (you can find command ids from Journal file).

RevitCommandId id = RevitCommandId.LookupCommandId("ID_CONVERT_TO_STAND_ALONE");

// Post the revision editing command
if (uiapp.CanPostCommand(id))
uiapp.PostCommand(id);


I looked into ElementTransformUtils.CopyElements method. But this is for copying (copy&paste) elements between views and not for duplicating views. And as I see from the UI, duplicated views do not keep the overrides applied by Linework tool.

I requested the Revit dev-team to allow PostCommand work for ID_CONVERT_TO_STAND_ALONE. The ticket is REVIT-27681.


Katsuaki Takamizawa
Technical Support Specialist
Message 4 of 6
Dale.Bartlett
in reply to: Katsuaki.T

A year on... Is there any way to apply the LINEWORK tool to a view? For example, all the cut edges. Regards, Dale  




______________
Yes, I'm Satoshi.
Message 5 of 6
Anonymous
in reply to: Dale.Bartlett

I don't think so, I also asked about this back in July. Jeremy put in a request to the dev team about it but I haven't heard any more about it.

 

http://forums.autodesk.com/t5/revit-api/change-line-style-of-geometry-edges-per-view-linework-tool/m...

Message 6 of 6
lionel.kai
in reply to: BobbyC.Jones

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