Python Forum
Data not being set by x.Set() - Revit
Thread Rating:
  • 4 Vote(s) - 2.25 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Data not being set by x.Set() - Revit
#1
Hi Guys

im trying to write a script for Dynamo where i compare two values, from two 'elements' and if a==b AND c==d then copy the value from x to y.

my current code does not return any errors but the value does net get copied over.

Any help would be much appreciated.

fixtures = UnwrapElement(IN[0])
circuits = UnwrapElement(IN[1])

TransactionManager.Instance.EnsureInTransaction(doc)
for i in fixtures:
	a = i.LookupParameter("Comments")
	b = i.LookupParameter("Panel")
	c = i.LookupParameter("Circuit Number")
	for j in circuits:
		d = j.LookupParameter("Comments")
		e = j.LookupParameter("Panel")
		f = j.LookupParameter("Circtuit Number")
		if b==e and c==f:
			a.Set(d)
TransactionManager.Instance.TransactionTaskDone()
PS - my first of hopefully many posts in this community :D
Reply


Messages In This Thread
Data not being set by x.Set() - Revit - by raswart - Jan-11-2019, 07:16 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020