Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 8546

Use Rhino.Input.Custom.GetObject() more then once

$
0
0

@onrender wrote:

How can I use Rhino.Input.Custom.GetObject() twice in a code? When I use the script below it handles only the first object.

import Rhino
import scriptcontext
import rhinoscriptsyntax as rs

objsEdge = []
objs = []

def selectObject1():
    # objs[0] First Object
    gs = Rhino.Input.Custom.GetObject()
    gs.GeometryFilter = Rhino.DocObjects.ObjectType.Curve
    gs.Get()
    obj_ref = gs.Object(0)


def selectObject2():
    # objs[1] Second Object
    gs1 = Rhino.Input.Custom.GetObject()
    gs1.GeometryFilter = Rhino.DocObjects.ObjectType.Curve
    gs1.Get()
    obj_ref2 = gs1.Object(0)
    
selectObject1()
selectObject1()

Posts: 4

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 8546

Trending Articles