Creating a Custom autolisp to select & filter dimension types

Billy

Usenet Archive
Joined
Dec 28, 2000
Messages
12
Reaction score
0
Hello,

I am currently a user of Autocad 2000 and would like to create a custom Autolisp function which will allow me to select a group of objects and only select the dimension types that I want (ie. rotated, ordinate, radial, diameter...but not angles). This is kind of like the Qselect function except that Qselect does not allow you to select many types of dimensions as the filter criteria. I am new to autolisp and don't have any experience with it.

I have tried the following command in autocad:

(setq sel1 (ssget '((0 . "DIMENSION"))))

This allows me to select all Dimension types. Does anybody know how I can specify which types of dimensions I can select (ie. rotated, ordinate, radial...etc.) ?

Any help would be greatly appreciated,
Thanks

Billy Chan
 
I have tried the following command in autocad:

(setq sel1 (ssget '((0 . "DIMENSION"))))

This allows me to select all Dimension types. Does anybody know how I can specify which types of dimensions I can select (ie. rotated, ordinate, radial...etc.) ?

It would be nice if it would be possible to use
(ssget '((0 . "DIMENSION") (100 . "AcDbAlignedDimension"))) to filter aligned dimensions, but unfortunately you can't.

You need to make a function which looks for all dimensions in your selection set and checks for the presence of (100 . "AcDbAlignedDimension") or (100 . "AcDb3PointAngularDimension") and so on. This is easy to do.

Tom Berger
 
Tom Berger said:
It would be nice if it would be possible to use
(ssget '((0 . "DIMENSION") (100 . "AcDbAlignedDimension"))) to filter aligned dimensions, but unfortunately you can't.

You need to make a function which looks for all dimensions in your selection set and checks for the presence of (100 . "AcDbAlignedDimension") or (100 . "AcDb3PointAngularDimension") and so on. This is easy to do.

Tom Berger

Hi Tom,

Thank you for your reply and input. You will have to excuse my inexperience with AutoLISP and it's syntaxes. What does group code 100 mean? How is it used in conjunction with the ssget function?

What does it mean to include these lines into the ssget command?:
(100 . "AcDbAlignedDimension") or (100 . "AcDb3PointAngularDimension")

If you could please elaborate, that would be great!
Thanks,

Billy Chan
 
Thank you for your reply and input. You will have to excuse my inexperience with AutoLISP and it's syntaxes. What does group code 100 mean? How is it used in conjunction with the ssget function?

As I already tols you: you can't use it in a SSGET filter list, as it isn't a unique dxf code (try (entget (car (entsel))) to see the dxf definition of a dimension entity - there are multiple "100" groups).
What does it mean to include these lines into the ssget command?:

Create a selection set filtering for dimensions:
(setq sset (ssget '((0 . "DIMENSION"))))

Then step thru all the entities in your selection set and check for the presence of a (100 . "AcDbAlignedDimension") or a (100 . "AcDb3PointAngularDimension") group. Best is to do this in a COND, and to build new selection sets for the different types of dimensions.

Tom Berger
 

Latest threads

Back
Top