Get Element.LocationPoint by Python node, how?

Hello,

Actually I have some problems with my packages, i try to solve the problem via python:

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

elements = UnwrapElement(IN[0])
points =[]

for e in elements:
    bb = e.get_BoundingBox(None)
if not bb is None:
    centre = bb.Min+(bb.Max-bb.Min)/2
	points.append(centre)

OUT = points

I tried this also :slight_smile:

for e in elements:
    bb = e.get_BoundingBox(None)
    points.append(bb)

OUT = points

image

Items = UnwrapElement(IN[0])
ispoint =[]

for item in items:
	try:
	loc = item.Location
	if loc.ToString() == 'Autodesk.Revit.DB.LocationCurve':
		ispoint.append(0)

OUT = ispoint

There is still some Syntex error, i don´t know where…

I want just filter via points… my duplicated TextNodesDeleteDuplicatedText.dyn (15.8 KB)

Some info or workaround would be nice

KR

Andreas

Hi @Draxl_Andreas,

The boudingbox of an annotation works only in the active view.
It would be better to use the Coord property.

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

elements = UnwrapElement(IN[0])
points =[]

for e in elements:
	points.append(e.Coord.ToPoint())

OUT = points


DeleteDuplicatedText.dyn (13.8 KB)

5 Likes