Jump to content
Developer Wiki and Function Reference Links ×

finding the exact insertion point of pio


Recommended Posts

Hi Robert,

Please allow me to quote from my own work:

....snip....The coordinates of the insertion point (the position of the object) can be read by the object's code, too. However, they always return the position of the Plug-in Object relative to the Internal Origin, whether the User Origin was moved or not. It seems like the User Origin is temporarily is reset to (0,0), making it impossible to let the object retrieve it's own location relative to the User Origin.

Of course there are only a small number of Plug-In Object types that really need such possibilities. Therefore there has been only a limited number of complaints about this issue on the VectorScript list, showing a false image of reality.

I ensure you that every end user who has ever tried to make a Plug-In object will immediately write a simple "I Show My Current Location" type of Plug-In once that barrier is lifted.

http://www.vectorlab.info/index.php?title=Absolute_Origin#Plug-In_Objects

PROCEDURE HereAmI; 
VAR hParm, hParmRecord, hWall : HANDLE; 
   PIOName, txtStr: STRING; 
   x, y : REAL; 
BEGIN 
IF GetCustomObjectInfo(PIOName, hParm, hParmRecord, hWall) THEN 
   BEGIN 
   GetSymLoc(hParm, x, y); 
   txtStr:= Concat(x, ' / ', y); 
   Locus(0, 0); 
   TextOrigin(0, 0); 
   BeginText; 
       txtStr 
   EndText; 
   END;
END; 
Run (HereAmI);

Thanks,

Gerard

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...