Hi everyone,
i am looking nodes for textnotes to get point location.how to get boounding box.
I attached image here.
thanks advance.
hussain
Hi everyone,
i am looking nodes for textnotes to get point location.how to get boounding box.
Hey @thsa2501
If you snoop it you’ll get to see that we can that there’s a method GetLeaders
which gives us the access to leader properties :- Anchor, Elbow and End locations.
def tolist(obj1):
if hasattr(obj1,"__iter__"): return obj1
else: return [obj1]
textnotes = tolist(UnwrapElement(IN[0]))
#Do some action in a Transaction
anchorloc = []
elbowloc = []
endloc = []
TransactionManager.Instance.EnsureInTransaction(doc)
for note in textnotes:
leaders = note.GetLeaders()
anch = []
elbo = []
end = []
for lead in leaders:
anch.append(lead.Anchor)
elbo.append(lead.Elbow)
end.append(lead.End)
anchorloc.append(anch)
elbowloc.append(elbo)
endloc.append(end)
TransactionManager.Instance.TransactionTaskDone()
OUT = anchorloc,elbowloc,endloc
Hope it resolves your doubt.
Regards,
BM
Hi bharat,
thanks for the reply. I checked your code in dynamo. It’s getting error’s find attached image.
thanks
hussain
hi bharat,
i got it. lot of thanks…
Glad you got it. I posted the code without Boilerplate Code.
Happy you resolved it.