DynamoDS / DynamoRevit

Dynamo Libraries for Revit
https://dynamobim.org
328 stars 184 forks source link

Extensible Storage: Can't resolve Entity.Set methods #2979

Open dobriai opened 9 months ago

dobriai commented 9 months ago

Dynamo Version

Dynamo Core 2.19.0.6156 Dynamo Revit 2.19.0.2555

Revit Version

Dev2025

Operating System

Windows 11

What did you do?

Inside a Python Node, none of these calls can be resolved:

entity.Set[String]('MyString', 'FFFff')
entity.Set[str]('MyString', 'FFFff')
entity.Set('MyString', 'FFFff')

I always get a "TypeError: No method matches given arguments".

In the examples above entity is a valid Autodesk.Revit.DB.ExtensibleStorage.Entity, with a string filed named 'MyString'.

The same calls resolve fine in RevitPythonShell, which appears to be using IronPython 3.4.0 (3.4.0.1000).

Similar problems with int fields - could not formulate a Set-call that would work in DR, while the shell was OK.

Also of some note, the related Get-calls do get resolved fine. The only obvious difference there is that those take a single string argument - the name of the field.

The flavors of Set that take a Field as a first arg also do not resolve in DR, BTW.

I understand that the current version pythonnet is know to have similar problems - this issue is just a reminder to re-test after the upgrade, which we hope to be coming soon.

I have not bothered testing this with earlier releases of Revit/DR - probably should. If I do, will add comments.

What did you expect to see?

The Set call to succeed, of course.

What did you see instead

The TypeError described above.

Stacktrace/logs

Not sure how to get a stack.

Details

No response