Placing Spot Elevations

revit

#1

Attempted to modify some python code to place spot elevations, however I’m running into some trouble. Any help would be great!

I’d rather use Dynamo out of the box nodes, but couldn’t find any for the spot elevations. that would be a good direction also.

Thanks

 

2016-03-16 18_12_44-Edit Python Script...

#2

I have deduced the issue is with the “Reference” in

public SpotDimension NewSpotElevation(
	View view,
	Reference reference,
	XYZ origin,
	XYZ bend,
	XYZ end,
	XYZ refPt,
	bool hasLeader
)

I am currently using Reference(Element), which gives me a reference, however it won’t create the Spot Dimension. If instead I manually create a spot elevation and read the Reference and use that reference it works, so I’m certain it is my calling of the reference.

Any thoughts?



#3

it has to be a valid reference (valid for that view that is since annotations are view based) so what you have to do is make sure that you are getting objects geometry and turning on references as well as invisible geometry for that view. This topic was already discussed before:

http://dynamobim.org/forums/topic/newspotcoordinate-method-in-python-script/


#4

Konrad, Thank you for the post and link. I’ll give it a shot and post my findings.