Python use any floor plan then active view

Hi, does anyone know how to change the active view in this code to just retrieve any floor plan in the model so the script dosnt have to be run on an active floor plan? I cant remember who and where I got this code anymore

		#Create elevation marker and elevation in position 0.
		eleMarker = ElevationMarker.CreateElevationMarker(doc, viewType.Id, elevationPT, 100)
		ele = eleMarker.CreateElevation(doc, doc.ActiveView.Id , 0)
		viewid.append(ele)
		Marker.append(eleMarker)

I tried to add a view in dynamo to the code but need viewplan ID I think


image
image

ok so I had to make it floorplan.Id and it worked

1 Like