I recently started using python scripts, and now I want to use the “AttachGHSData” tool, but my question is even larger than only this tool.
Since RhinoScriptSyntax does not include a function to call for this tool, I have to call it with rs.Command(“-AttachGHSData …”), as if I was doing it manually in command line. The next options works fine with python as they are only lists of characters to put in rs.Command.
However, at one point, I have to “select surface”, which is placing me out of the script for manual selection of a surface, but I would like to select it automatically in the script. I have no clue for doing so or if it is possible, any idea ?
Selection before calling the tool is not working
because the selection stops when calling it, and I don’t succeed calling a layer by its name in command line, I can only click on the surface.
Example of script which requires manual selection when I don’t want to:
import rhinoscriptsyntax as rs
rs.Command("-AttachGHSData TankItems Edit TANK1 Tank ")