Willem Derks wrote:
Hi,
At last I have some time to pick up on RhinoPython.
My current challenge: set text to display a detail scale.
What I have so far already halts after selecting a detail.
Can anyone help to show me on how to approach this, furthermore any reading to prevent me asking apparent beginners questions like this.Thanks
-WillemWhat I have so far:
import rhinoscriptsyntax as rs import Rhino def DetailScaleToText(): # Get the detail DetailID = rs.GetObject("Select Detail for scale", rs.filter.detail, True, False) if( DetailID==None ): return # I understand that DetailID is now a System.GUID # But how to go about getting the ration of that Detail it refers to # per Rhino.Geometry.DetailView.PageToModelRatio DetailObject = ? ratio = DetailObject.PageToModelRatio print ratio # Check to see if this file is being executed as the "main" python # script instead of being used as a module by some other python script # This allows us to use the module which ever way we want. if( __name__ == "__main__" ): DetailScaleToText()
Posts: 2
Participants: 2