I want to create a script where spot coordinates are created all the structural columns in a view automatically. The script I tried is not working. Nothing is happening. Can someone point out what I am doing wrong?
I don’t think annotation tag works for spot elevations.
Clockwork package has a node called SpotElevation ByPoint. You should try that.
Hi. But that is spot elevations. What I am looking for is spot coordinates.
Ah sorry, I misread. But you can actually edit the clockwork node SpotElevation ByPoint, open the python, and at line 33, change
and then save as a new node. They take the same inputs so it should behave the same.
Maybe @Andreas_Dieckmann can make a SpotCoordinate node in addition to his SpotElevation?
Hey Thanks. That is simple enough.. I did the changes and saved it as new custom node. Now how do i insert in diagram? It is not showing anywhere?
@kennyb6 Sure, will add it to next Clockwork version.
Could you look in to this by any chance?
Maybe like this? Worked for me.
import clr clr.AddReference('RevitAPI') from Autodesk.Revit.DB import * clr.AddReference("RevitNodes") import Revit clr.ImportExtensions(Revit.GeometryConversion) clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager doc = DocumentManager.Instance.CurrentDBDocument v = UnwrapElement(IN) r = UnwrapElement(IN) p = UnwrapElement(IN).ToXyz() o = UnwrapElement(IN).ToXyz() n = UnwrapElement(IN).ToXyz() TransactionManager.Instance.EnsureInTransaction(doc) e =  e.append(doc.Create.NewSpotCoordinate(v, FamilyInstance.GetReferenceByName(r,"Center (Left/Right)"), p, o, n, p, True)) TransactionManager.Instance.TransactionTaskDone() OUT = e
To use it on multiple elements just wrap it in een custom node and set input to
var (singular input) and manage your input lists outside the node. So 1 view, 1 element, 1 point etc. Alternatively mange it in the python self but then you have to provide specific input for the node to work. Which means that you need to manage your input outside the node what you would do anyway so why bother with complex solutions in python?