Hi,
any ideas what Python3 syntax error have I here?
It gives only a warning here, but if I put it in a function C3D crashes.
Semicolon on line 39.
It is a known issue of Python.Net that does not support the correct conversion of IDisposable objects (those that you use in context managers, the âwithâ keyword in Python).
fyi @Michael_Kirschner2 this effectively prevents from using Python 3 in Dynamo for Civil 3D
Sadly that wasnât that
I guess there is something with the StyleCollection Item syntax, but no idea what.
Oh, okay. So for now IronPython2 it is. Thanks.
Try this instead of using the indexer:
bs = civdoc.Styles.ProfileViewBandSetStyles.get_Item(âCut and Fillâ)
Oh wow that works. Thanks.
the issue is that the error message you got and the actual problem were different and annoyingly you need to change the syntax as if in Python 3 the collection[index] were not supported (which is not the case of course)
This is generally a big problem for me lately with python nodes as Iâm not a programmer only an engineer, so usually I only have trial and error from line to line and then, I still donât know whatâs wrong. ⌠But one step at a time, thanks for the info.