One script I have imports IFC’s through VisualArQ, selects all, meshes, joins based on layer, exports to a new file and reopens. That one always fails unless I run something in python editor.
I have another one too, that sections through stuff and the thing they share is that they use rs.Common("Mesh ‘+settings’ ") to mesh all kinds of stuff and then uses rs.LastCreatedObjects() to identify them, and that too fails unless I run the exact same script from the python editor first. Then it works flawlessly after.
But if I make a simple tool like this one:
import rhinoscriptsyntax as rs
rs.Command("_Box 0 10 10 10")
box = rs.LastCreatedObjects()
box = makeBox()
Then it works just fine…
So I guess it’s not as easy as to just find the bug then…