ReferenceCallout Leader

ReferenceCallout Leader

Anonymous
Not applicable
324 Views
2 Replies
Message 1 of 3

ReferenceCallout Leader

Anonymous
Not applicable

What I want to do programatically is create a reference callout with a leader oriented diagonally to the upper right.

ReferenceCalloutExample.PNG

 

My attempt was to use the CreateReferenceCallout method to create a a reference callout and rotate it using ElementTransformUtils.RotateElement. However this rotated the entire element. Additionally I cannot control the leader elbow position.

ReferenceCalloutRotated.PNG

 

Judging from the lack of relevant methods in the API docs and a 2015/2016 forum post, it seems that this just isn't possible. Is this correct or is there a way to achieve this?

https://forums.autodesk.com/t5/revit-api-forum/revit-2015-setcropregionshape-of-reference-callout/m-... 

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

jeremytammik
Autodesk
Autodesk

Can you achieve the desired result manually through the user interface?

 

If so, use RevitLookup and other Revit database exploration tools to observe exactly what changes your manual interactions cause in the model:

 

 

With that information in hand, you can set out automating this task.

 



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

0 Likes
Message 3 of 3

Anonymous
Not applicable

It is easy to achieve in the UI. All you need to do is grab the blue leader points and drag them with your mouse.

ReferenceCalloutDrag.PNG

 

The CreateReferenceCallout method returns void and snooping the reference callout just shows an Element. Therefore, it appears there is no clear way of editing the reference callout through the API, unless there is some clever trick. 

ReferenceCalloutSnoop.png

 

I'll try exploring some of the other database tools you linked though Jeremy.

Thank you.

0 Likes