Sir_Dan_Fortesque Posted January 9, 2002 Share Posted January 9, 2002 Hello, Can someone help me with the following problem. I have a PIO (Plug In Object) which draws a rectangle on the drawing. The rectangle appears in the drawing AFTER the end of the PIO. This is a problem for me because I have to attach a record on the rectangle during execution of the PIO. How can I draw my rectangle during the execution of the PIO? I will appreciate your help very much and I wish you a very nice day. Friendly greetings, StarGate Quote Link to comment
Sir_Dan_Fortesque Posted January 10, 2002 Author Share Posted January 10, 2002 Hello Everyone, Yesterday I posted this problem. In the meantime I found the solution. You will find the code below this text. First create a record called recTest. Then create 2 fields called width and height. Then create a PIO or a Vectorscript and past the code below. You are ready to run now. The code draws a rectangle and connect record recTest to it. Also it fills the fields with some example values. Hope you find some use for it. Have a nice day. Friendly greetings, StarGate procedure Test; var hndLayer:handle; hndObject:handle; hndRecord:handle; LntPosX:longint; LntPosY:longint; BEGIN { Start main program } hndLayer := ActLayer; hndRecord := GetObject('recTest'); GetVCenter(LntPosX,LntPosY); SetRField(hndRecord,'recTest','width','150'); SetRField(hndRecord,'recTest','height','250'); rect(LntPosX-100,LntPosY-100,LntPosX+100,LntPosY+100); hndObject := LnewObj; { This code does the trick } SetRecord(hndObject,'recTest'); END; { End of script Test } run(Test); 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.