DomC Posted April 26, 2015 Share Posted April 26, 2015 (edited) Hi I try to use this Function, but failing by fuguring out the right parameters/variables. I do not understand if i have to get the Variables from an other action/function or if I just missing the right values. Very nice if anyone could help Thanks This is, what the FunctionReference says: VectorScript Reference.html PROCEDURE AlignDistribute2D ( MenuAction :LONGINT; AlignDist2DParms :LONGINT ) ; Python: def vs.AlignDistribute2D(MenuAction, AlignDist2DParms): return None or here: Python: AlignDist2DParms = vs.AlignDistribute2D(MenuAction) I try to do, something in this direction (Script to Distribute, with a fix offset by expanding the limits): import vs links,rechts,unten,oben,xtotal,ytotal=0,0,0,0,0,0 anzahl=vs.NumSelectedObjects() # Box auslesen und x, y ausgeben def xy(): p1,p2=vs.GetBBox(h) x=abs(p1[0]-p2[0]) y=abs(p1[1]-p2[1]) xmin=p1[0]; xmax=p2[0]; ymin=p1[1]; ymax=p2[1] return(x,y,xmin,xmax,ymin,ymax) #vs.AlrtDialog(anzahl) i=1 h=vs.FSActLayer() while h != None and i <= anzahl: x,y,xmin,xmax,ymin,ymax=xy() if links>xmin: links=xmin if rechts rechts=xmax if unten>ymin: unten=ymin if oben oben=ymax #vs.AlrtDialog(xmin,' ', xmax) xtotal=xtotal+x ytotal=ytotal+y h=vs.NextSObj(h) i+=1 rx_abs=links+xtotal vs.Locus(rx_abs,0) # vs.AlignDistribute2D(??) #?????? vs.LNewObj(h) vs.DelObject(h) Edited April 26, 2015 by DomC Quote Link to comment
_c_ Posted May 18, 2015 Share Posted May 18, 2015 Hello DomC, I looked into this: it's a broken procedure (does nothing at best) and is wrongly declared on Dev (actually is wrongly defined in its library). Thank you for pointing this out, I report it now as bug. Please implement your own procedure using other functions. Ciao! orso Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.