Jump to content
Developer Wiki and Function Reference Links ×

InsertVertex()


kiwi

Recommended Posts

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 [Confused]

code:

  

InsertVertex(FSActLayer,100,100,2,0,0);
[/code]

Link to comment

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]

Link to comment

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

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...