Jump to content
Developer Wiki and Function Reference Links ×

Script run on objects while in VP Annotation


twk

Recommended Posts

Hello peoples..

I'm trying to run a script while inside a VP annotation, it's baffling me, as to why by using foreachobject(and using sel=true for criteria) or by using foreachobjectinlist(using a number of combinations for the obj/trav options, i still can't get a handle to the selected objects inside the VP.. below is my code

PROCEDURE RandomRotate;
VAR
VPhnd, h2ViewPortGroup : HANDLE;
{$DEBUG}
FUNCTION RandRot(h:HANDLE):BOOLEAN;
	VAR
		px, py : REAL;
	BEGIN
		IF GetTypeN(h) = 15 THEN
			BEGIN
				GetSymLoc(h, px, py);
				HRotate(h, px, py, Random*90);
			END;
	END;

BEGIN
DSelectAll;
VPhnd := FSActLayer;
h2ViewPortGroup := GetVPGroup(VPhnd, 2);
{ForEachObject(RandRot, SEL=TRUE);}
ForEachObjectinList(RandRot, 2, 1, h2ViewPortGroup);
END;
RUN(RandomRotate);

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