Set Location of Adaptative points in an Adaptative Components

hi @talbimam,

Sorry I do not understand how I can controle the points with this command (surface.pointatparameters). I have already a old an new position point, what I want is just make the translation.

I was thinking in generate this movement via python.

    adaptComp = AdaptiveComponentInstanceUtils.CreateAdaptiveComponentInstance(doc, famsymb)
    adptPoints = AdaptiveComponentInstanceUtils.GetInstancePlacementPointElementRefIds(adaptComp)

    aPt1 = doc.get_Element(adptPoints[0])
    aPt2 = doc.get_Element(adptPoints[1])
    aPt3 = doc.get_Element(adptPoints[2])
    #Asign the new locations()

    loc1 = XYZ(0,0,0)
    loc2 = XYZ(0,40,20) 
    loc3 = XYZ(40,40,0) 

    #Some vector math to get the translation for MoveElement()
    trans1 = loc1.Subtract(aPt1.Position)
    trans2 = loc2.Subtract(aPt2.Position)
    trans3 = loc3.Subtract(aPt3.Position)
    trans4 = loc4.Subtract(aPt4.Position)

    #Position Adaptive Component using MoveElement()

    ElementTransformUtils.MoveElement(doc, adptPoints[0], trans1)
    ElementTransformUtils.MoveElement(doc, adptPoints[1], trans2)
    ElementTransformUtils.MoveElement(doc, adptPoints[2], trans3)
    ElementTransformUtils.MoveElement(doc, adptPoints[3], trans4)

But I am not sure if it can work

1 Like