Alien
May 14, 2024, 11:03am
1
So I managed to create some fields… But now I’m trying to set entities and failing miserably.
I’ve created 2 fields before I built the schema. One is XYZ (which I think is an array or list? One is a string.
I’m trying to set the entity in the field but can’t find a single way that works. Every time I get the error, “No method matches given arguments”.
I’ve tried it multiple ways (a selection below - look at lines 50 onwards )
How do you set entities?
I would think that would be an XYZ element - Revit’s method for Points and vectors.
I recommend starting with an integer, then a double, then a string. Don’t eat the moose in one sitting - break it up over a few passes.
1 Like
Alien
May 14, 2024, 11:39am
3
I tried both in various ways (I did them one at a time and then commented them out when they didn’t work)… Nothing works
It’s an PythonNet2 issue with template Parameters, see this topic
Hi folks,
I’m having trouble using method overloading when using the CPython engine in Dynamo 2.10
Please check the following code to create a schema and place an instance of it in an element in the model.
It works just fine in IronPython but crashes in CPython (I skip the import block for brevity):
component = UnwrapElement(IN[0])
TransactionManager.Instance.EnsureInTransaction(doc)
def create_schema():
schema_guid = System.Guid("DF3BBCC1-4D4D-4A01-B444-F9722814F9CE")
schema_build…
1 Like
Alien
May 14, 2024, 1:10pm
5
OMFG… THANK YOU x 100000…
I wasted 4 bloody hours on that! And I’d have probably wasted another x hours if you’d not said that!
Progress
I have done it in two parts, my syntax wasn’t working for the build in IronPython… So have split them. sighs
Again, thank you. Can’t express what a relief this is
1 Like