Jump to content
Developer Wiki and Function Reference Links ×

Round kickplate not contained with LOCation


WhoCanDo

Recommended Posts

Hi,

 

Can anyone tell me how I can get this to work please? If T=Wall it works, but not if T=RoundWall. This is because the center point of the RoundWall is not within LOC.

Procedure Check_for_Wall (hKP : handle);
begin
AlertDialog ('Here');
end;

Procedure Check_Adjust (h : handle);
begin
SetName (h, 'Tmp');
ForEachObject (Check_for_Wall, ((Loc = 'Tmp') & ((T = Wall) or (T = RoundWall))));
DelName ('Tmp');
end;

Begin
Get the handle from bounding polygon and pass to Check_Adjust
end;

 

Capture.JPG

Link to comment

I believe that Loc only returns objects that have the center point of the object bounding box within the named object. For Round Walls it appears that it is the center point. I just did a test and can get a round wall to be counted as part of a space even when the wall itself is outside as long as the center point is in the names object. For regular walls the critical point appears to be the center point of the wall.

 

So to answer your question, yes, it is because the center point is outside of the object.

Link to comment

Finally. Fixed. Couldn't use ForEachObjectAt because a point is not and object for LOC, so I ended up finding all RoundWalls, calculating the center (of the wall not the CL), adding another 2mm straight wall at that location, so that LOC worked.

 

Unfortunately, SetName did not work because LNewObj & LActLayer failed as usual, so I ended up finding all 2mm walls at the end and deleting them.

 

A lot of fussing around when LOC says "Location is contained within boundary of a named object".

 

Thanks all.

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