Jump to content
Developer Wiki and Function Reference Links ×

Location (LOC) criteria not working on objects in groups within symbols


Recommended Posts

Hi all,

 

I've build a script that uses CallTool(-203) to draw a square and use that as a LOC criteria to isolate or hide objects. To get the handle of the newly created object within a symbol I had to use NextObj (dummyH) as was advised here. So far everything works. Except when using the tool on objects that are within a group within a symbol. Then the LOC criteria doesn't seem to work. Do you have any tips?

 

See attachment for VW file with scripts and object, or use the code below

box selectie.vwx

 

Code for IsolateBoxSelection:

PROCEDURE IsolateBoxSelection;

VAR
	H1, dummyH				:HANDLE; 


BEGIN
	Locus(0,0);
	dummyH := LNewObj;
	CallTool(-203);
	h1 := NextObj (dummyH);
	SetName(h1, 'MySelectionPolygon');
	DSelectAll;
	SelectObj(INSYMBOL & (LOC='MySelectionPolygon'));
	Hide(INSYMBOL & (SEL=False));
	DSelectAll;
	DelObject(h1);
	DelObject(dummyH);
	ReDrawAll;
END;		

Run(IsolateBoxSelection);

 

Code for HideBoxSelection:

PROCEDURE HideBoxSelection;

VAR
	H1, dummyH				:HANDLE; 


BEGIN
	Locus(0,0);
	dummyH := LNewObj;
	CallTool(-203);
	h1 := NextObj (dummyH);
	SetName(h1, 'MySelectionPolygon');
	DSelectAll;
	Hide(INSYMBOL & (LOC='MySelectionPolygon'));
	DelObject(h1);
	DelObject(dummyH);
END;		

Run(HideBoxSelection);

 

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