Elevation Marker exercise

Hi, I am attempting to make a simplified version of http://learndynamo.com/mod2/ creation of building elevations. At this point I am not versed enough in Python to fully utilize this script.

Therefore, I have gone through VS and tried to figure out what method to use. I’m almost there I think, but I cannot convert the Dynamo point object to a Revit with the ‘To.Xyz()’ method.

Is it possible that this is failing because I did not import the correct libraries? I think i did.

# Enable Python support and load DesignScript library
import clr

# wrapping and unwrapping Revit Elements
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.Elements)

clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

clr.AddReference("RevitServices")
from  RevitServices.Persistence import DocumentManager
from  RevitServices.Transactions import TransactionManager

##########################################################

toggle = UnwrapElement(IN[0])
pt = UnwrapElement(IN[1])
viewId = UnwrapElement(IN[2])
#output = []

#create Revit Point facsimile
elevPt = pt.ToXyz()

# assign current document
doc = DocumentManager.Instance.CurrentDBDocument



if toggle == True:

	TransactionManager.Instance.EnsureInTransaction(doc)
	

	collector = FilteredElementCollector(doc, doc.ActiveView.Id)
	
	elevation = ElevationMarker.CreateElevationMarker(doc, viewType, elevPt, 100)


	TransactionManager.Instance.TransactionTaskDone()
	
OUT = elevation

You are don’t have the correct viewtype when you make the elevations.
Use viewID from the input 2 where you have viewType.

Thanks Sean, I made the adjustment; however, I am still getting the “point has no attribute To.Xyz”

I think you need to add a reference to your python because it works fine for me.
Try adding the

clr.ImportExtensions(Revit.GeometryConversion)

under the RevitNodes section.

@SeanP - this has resolved my issue. Might be helpful for me to make a template for these modules.

Sorry for the late reply and thank you for the help.