Jump to content
Developer Wiki and Function Reference Links Read more... ×
WhoCanDo

Round kickplate not contained with LOCation

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

Share this post


Link to post

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.

Share this post


Link to post

Thanks JB, I will give that a go 😊

Edited by WhoCanDo
Misread

Share this post


Link to post

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.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×