I would like to automate the placing of callouts on sheets:
- Manually create callout in Revit
- Run dynamo script:
- “Isolated Pick Model Elements” OR “Springs node - Get selection” (??)
- Select callout
- Dynamo places view on sheet (by coordinates)
Please see attached attempt at a script.
However I cannot get this to work. The selected callout does not feed into the script.
If anyone has made a similar script or has any suggestions, I would be very grateful.
Thanks in advance!
210321 Place selected view on sheet_2021-04-02_02-15-11|690x404
Do you mind posting another screenshot with the output previews enabled for the various nodes? It will help when checking list levels.
As for the question in the screenshot on transaction nodes… you should not need them for this workflow. You are correct in that transaction nodes allow you to sequence parts of the graph so that it matches the intended workflow, but typically that comes into play when you are handling elements in Revit more than once.
“Make an empty sheet, then populate the new sheet with a view” could require transactions (element is created, then element is modified).
“Collect/filter a sheet list, also collect/filter selected views, then feed them into a placement node” should not require transactions (elements are handled separately).
Additionally, the passthrough node does essentially the same thing as start/end (anything downstream won’t fire off until the upstream parts of Waitfor are done), so it would be redundant to use both.
Thank you Robert.
I have removed the transaction nodes and turned on the output previews…
(It seems I get an error at the Rhythm viewport.create node.) :
It feels like I am getting close. Perhaps there is an alternative node for collecting the callout view from Revit?
The error message is “view cannot be added because it is already on another sheet” (it’s not) - perhaps it is confused by the callout marker which is placed in a sheet view.
I wonder if it could be a sequencing problem. Any help appreciated.
When you say the call-out is placed in a sheet view can you explain that a little more. Also, just for clarity the call-out is not technically a View, it’s a Viewer that references a View. I have had some issues in the past working in full blown add-ins that have suffered a similar problem. You could use getParameter node and ask it for Sheet Number and shee what it says.
Thank you for your reply.
What I meant was that the callout itself has been placed in a view that is placed on a sheet. See attached screenshot (A= callout in question, B= sheet title block).
But when I use element.parameters the sheet number is shown as " — " (note I get the same result with element.getparameterbyname). See second screenshot item C.
How can I find out what Dynamo thinks this object is (i.e. click on object, use a node to query “what is this object”? - is it a view, a wall, a model line, a title block, etc?)
Perhaps I should use the parameter for “view name” to get the view itself in Dynamo, and place that on the sheet? (note screenshot item D)
I could use a similar method to getting the sheet (all elements of type “views”, filter by boolean mask).
Hope that helps. Many thanks for your advice.
Note I am using now the springs node selectelementsinorder which does not change the behaviour of the graph.
- Object.Type node will tell you what it is.
- You could use the built in parameter VIEW_NAME as you mentioned then use View.ByName and try placing that.
My guess is the placement node has a check for placing it and if it breaks then.the message is as you see.
Many thanks @SeanP
- The object.type of a selected callout seems to be “unknownelement” so I guess it won"t be recognised as a view. This seems strange to me, because when you click on a callout in Revit its properties show as a view.
- OK, I have added some nodes that get the actual view, based on the parameter “view name” of the callout.
This seems to be working now - click on callout and it places it on chosen sheet (I will use Dynamo player).
If anyone can suggest a way of streamlining this graph I would be very grateful.