kiwi Posted February 11, 2005 Share Posted February 11, 2005 I'm having issues with he InsertVertex() function... it don't seem to respect the values x,y: REAL I pass to the script. I'm not sure if I'm missing something or is a bug... if someone could draw-select in VW 11 a 3 sided polygon and run this line to see if the new vertex end up in 100, 100... for me is always in 4333.8, 835.8 code: InsertVertex(FSActLayer,100,100,2,0,0);[/code] Quote Link to comment
MullinRJ Posted February 11, 2005 Share Posted February 11, 2005 Hi Kiwi, Yes, it works for me. The new vertex appears between the first and second points in the POLY. I ran the following in VW 10.5 without problem. Of course, a Poly must be on the active layer and be the only, or at least the first, selected object. How are you passing the X and Y values? Are you passing them between procedures as I did below, or are you getting them from outside your program? Interactively? Or from a file? Try using the debugger or place a Message() statement in your program to see what the values of X & Y are. Raymond code: procedure xxxx; procedure ModPoly(H :Handle; X, Y :Real); Begin InsertVertex(H, X, Y, 2, 0, 0); End; BEGIN ModPoly(FSActLayer, 100, 100); END; Run(XXXX);[/code] Quote Link to comment
kiwi Posted February 11, 2005 Author Share Posted February 11, 2005 I try everything... GRRRRRRR Is quite a big script, and so far I just develop my how AddVertex() procedure to keep going: read the old one, delete and create the new one... clumsy but I get the results to keep going. I always check graphical values with Locus(): my BBE glossary templates are full of { locus(MyP.x,MyP.y) } all ready to jump on action. A slow down on the debugger show the right values, the right position for the vertex... but the redraw is depressing! I'll try again tomorrow! Thanks Raymond Quote Link to comment
kiwi Posted February 14, 2005 Author Share Posted February 14, 2005 OK... I find that the document I was working on was kind of corrupt, and for some reason send all my scripts off coordinates. 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.