Spot coordinates

Hi
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?
01-11-2018%201059

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
doc.Create.NewSpotElevation
to
doc.Create.NewSpotCoordinate
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?

1 Like

Hey Thanks. That is simple enough.:grinning:. 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.

3 Likes

@kennyb6 Tried doing it but nothing happening. Obviously I am not doing something correctly. Can you check and guide?Auto dimensioning of columns.dyn (9.4 KB)

@Kulkul
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[2])
r = UnwrapElement(IN[0])
p = UnwrapElement(IN[1]).ToXyz()
o = UnwrapElement(IN[3]).ToXyz()
n = UnwrapElement(IN[4]).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
2 Likes

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?

1 Like