Hi, I have a script to make a curved section and I use (simplified)
rs.Command("Project SelID “+str(object)+” ")
To project the curve onto objects, but for some reason SelID and blocks doesn’t work within Project.
Can you please fix this?
@pascal if you know of any clever workarounds to project a curve to a block containing whatever then I would love to know
(I guess I can use explode block and then delete all objects after, but that is time consuming and memory hogging on large projects, so I would prefer another workaround)
It looks like it’s actually the combination of Project, SelID and a block that is the problem… SelID appears not to work for selecting an object to project onto if the object is a block instance.
I know it doesn’t help your workflow, but SelBlockInstance works in this case:
import rhinoscriptsyntax as rs
curve = rs.GetObject("Select curve to project",4,select=True)
if curve:
rs.Command("Project SelBlockInstance _Enter")
So it appears to confirm that the problem resides in the combination of SelID and Project with blocks
Well, maybe not only. SelBlockInstanceNamed doesn’t work either for Project targets, nor does a simple SelName…
Thanks, I can work around with that, but I see now that block’s have issues with project on other levels too, so I quess I need to explode them for a proper projection