Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5793

Move grasshopper component from python component using Metahopper

$
0
0

I’m sorry for asking quite much recently.
I’d like to move a value list before adding it to the Grasshopper document using python. This is what I tried already:

    # trying to modify the bounds    
    vl.Attributes.Bounds.Location.X += 100 #vl = ValueList

    #trying to use Metahopper (https://grasshopperdocs.com/components/metahopper/moveObject.html)
    from System.Drawing import Point
    a = ghenv.Component.Attributes.Bounds
    b = Point(a.X, a.Y)
    c = rs.AddPoint([1800,100,100])
    d = [100,100,100]
    ghcomp.MetaHopper.MoveObject(vl, d) # I tried variable a, b, c instead of d too

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 5793

Trending Articles