About Casting in Dynamo Python

About Casting in Dynamo Python

Anonymous
Not applicable
1,599 Views
1 Reply
Message 1 of 2

About Casting in Dynamo Python

Anonymous
Not applicable

In Revit API, it is easy to cast one type of Element into another. While in Dynamo, as far as I know there is no such way of casting. I have noticed that Mr. Tammik has mentioned something about RevitAPI Dynamo shell, so I post this for a solution.

 Example:

            Connector connector = null;
            MEPCurve mep = elem as MEPCurve;
            ConnectorSetIterator set = mep.ConnectorManager.Connectors.ForwardIterator();
Looking forward to your brilliant answers.
0 Likes
Accepted solutions (1)
1,600 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk
Accepted solution

Search for 'casting in Python':

 

https://duckduckgo.com/?q=casting+in+python

 

Cheers,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder