Jump to content

select


vhector

Recommended Posts

Hi,

I often get cad drawing with elements like parkings, trees etc. in the same layer and are not symbols.

You have alot of selection ways, like color, class line type and other types. Is there also a way to select on objects with same area or area between, like 12,1m2 and 12,8m2.

Vincent

Link to comment

It is possible to select objects with any type of criteria.

First you want to isolate objects based on the same attributes you find in the custom selection command as you said by color,type,etc. using

PROCEDURE ForEachObject(callback:PROCEDURE; c:CRITERIA);

Then in the callback procedure you can get other attributes from the objects returned and then compare the object value with your own value. For areas, it would be:

PROCEDURE SelItem(objHdl: HANDLE);

VAR

curArea: REAL;

BEGIN

curArea:= ObjArea(objHdl);

IF curArea = 1.2 THEN {Assuming the document units are m2}

SetSelect(objHdl);

END;

Link to comment
Is there also a way to select on objects with same area or area between, like 12,1m2 and 12,8m2.

Vincent

Hi Vincent

If those values are parameters that you can see in the Object Info Palette, then you can also check those value with:

IF GetRField(Handle of parking,Name of Plugin,Name of Field)=12,8m THEN ...

To get the name of plug in and field, you could make a report of those objects, then you can see them in the formula bar.

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