SSGET Not Filtering Arc Dimensions From Normal Dimensions

SSGET Not Filtering Arc Dimensions From Normal Dimensions

Anonymous
Not applicable
1,791 Views
6 Replies
Message 1 of 7

SSGET Not Filtering Arc Dimensions From Normal Dimensions

Anonymous
Not applicable

I was trying to make a simple Lisp routine and I've run into a small issue that I can't seem to get to work properly. I want the user to select some dimensions in my routine but can't seem to filter out Arc Length dimensions in ssget. For example:

 

 

Will still allow me to select arc dimensions but no other kind of dimension:

(SSGET '((0 . "~ARC_DIMENSION")))

 

Will still allow me to select arc dimensions but no other kind of dimension:

(SSGET '((0 . "ARC_DIMENSION")))

 

Will still allow me to select arc dimensions but no other kind of dimension:

(SSGET '((0 . "~DIMENSION")))

 

Will allow me to select any type of dimension including arc dimensions:

(SSGET '((0 . "DIMENSION")))

 

I can see in the DXF that the Arc Length Dimension is clearly "ARC_DIMENSION" but it seems as though ssget is recognizing it as though the dxf code could be "DIMENSION" OR "ARC_DIMENSION". I'm just curious if anyone else has dealt with this before or can reproduce this as I'm going crazy with this one.

 

 

Since this is my first post Smiley Very Happy I'll add I'm not a total rookie in the Autolisp stuff. I dabble with it quite a bit on smaller things but definitely still have a lot to learn and have been mostly self-taught during downtime at the office so I'm rough around the edges to say the least Smiley LOL



ARC DIMENSION DXF FROM (entget (car(entsel))):

((-1 . <Entity name: 7ffffb10ac0>) (0 . "ARC_DIMENSION") (5 . "29C") (102 . "{ACAD_XDICTIONARY") (360 . <Entity name: 7ffffb10bc0>) (102 . "}") (102 . "{ACAD_REACTORS") (330 . <Entity name: 7ffffb10c90>) (102 . "}") (330 . <Entity name: 7ffffb03a80>) (100 . "AcDbEntity") (67 . 1) (410 . "Layout1") (8 . "0") (100 . "AcDbDimension") (280 . 0) (2 . "*D7") (10 0.452139 3.19927 0.0) (11 0.599941 3.75088 0.0) (12 0.0 0.0 0.0) (70 . 37) (1 . "") (71 . 5) (72 . 1) (41 . 1.0) (42 . 1.22805) (73 . 0) (74 . 0) (75 . 0) (52 . 0.0) (53 . 0.0) (54 . 0.0) (51 . 0.0) (210 0.0 0.0 1.0) (3 . "Standard") (100 . "AcDbArcDimension") (13 -0.50327 4.14178 0.0) (14 -0.50327 3.35998 0.0) (15 -0.50327 3.75088 0.0) (70 . 0) (40 . 1.5708) (41 . 4.71239) (71 . 0) (16 -0.50327 4.14178 0.0) (17 -0.50327 3.35998 0.0) (18 0.0 0.0 0.0) (42 . 0.0) (50 . 0.0))

 

Running Autocad 2015 SP2 x64 w/ PW integration & Bentley Autoplant/Prosteel Installed(not running) if it makes a difference.

0 Likes
Accepted solutions (1)
1,792 Views
6 Replies
Replies (6)
Message 2 of 7

Ranjit_Singh
Advisor
Advisor

I get the same results. Maybe it is a bug. Try the -4 filter instead. 

0 Likes
Message 3 of 7

patrick_35
Collaborator
Collaborator

Hi

 

An example to test if the dimension is greater than or equal to 1000

(setq js (ssget "x" '((0 . "ARC_DIMENSION") (-4 . ">=") (42 . 1000.0))))

@+

0 Likes
Message 4 of 7

CADaSchtroumpf
Advisor
Advisor

Hi,

 

Or use code dxf 70 for generic select.

For exemple (for select linear, dimaligned, radius, diameter, length arc or angular)

 

(defun c:sel_same_dim ( / js dxf_ent dxf_70)
	(princ "\nSelect a type dimension to grip: ")
	(while (null (setq js (ssget "_+.:E:S" '((0 . "DIMENSION")))))
		(princ "\nWait a dimension select!")
	)
	(setq
		dxf_ent (entget (ssname js 0))
		dxf_70 (rem (cdr (assoc 70 dxf_ent)) 64)
	)
	(sssetfirst
		nil
		(ssget "_X"
			(list
				'(0 . "DIMENSION")
				(assoc 8 dxf_ent)
				(assoc 3 dxf_ent)
				(assoc 410 dxf_ent)
				'(-4 . "<OR")
					(cons 70 dxf_70)
					(cons 70 (+ dxf_70 128))
					(cons 70 (+ dxf_70 64))
				'(-4 . "OR>")
			)
		)
	)
	(prin1)
)
0 Likes
Message 5 of 7

Anonymous
Not applicable

This is the full line ssget filter I'm using to filter out dimensions. I want to be able to select only Aligned and Rotated type dimensions. So far it filters out everything properly except for the arc dimensions. I stole & adapted the dxf 70 bits from another thread about how the dxf 70 isn't a true bitcode, but believe I did it correctly:

 

(ssget '((0 . "DIMENSION") (-4 . "<AND") (-4 . "<OR") (70 . 000) (70 . 001) (70 . 032) (70 . 033) (70 . 064) (70 . 065) (70 . 096) (70 . 097) (70 . 128) (70 . 129) (70 . 160) (70 . 161) (70 . 192) (70 . 193) (70 . 224) (70 . 225) (-4 . "OR>") (-4 . "AND>")))

At this point I'm tempted to use what I have and then just manually filter out the arc dims later on in my function but it seems like poor practice to even allow users to select the arc dims in the first place.

0 Likes
Message 6 of 7

Ranjit_Singh
Advisor
Advisor
Accepted solution

Just add one more filter in your statement

 

(ssget '((0 . "DIMENSION") (-4 . "<AND") (-4 . "<OR") (70 . 000) (70 . 001) (70 . 032) (70 . 033) (70 . 064) (70 . 065) (70 . 096) (70 . 097) (70 . 128) (70 . 129) (70 . 160) (70 . 161) (70 . 192) (70 . 193) (70 . 224) (70 . 225) (-4 . "OR>") (-4 . "<NOT") (0 . "ARC_DIMENSION") (-4 . "NOT>") (-4 . "AND>")))

 

0 Likes
Message 7 of 7

Anonymous
Not applicable

Thanks, that's working perfect now. I must have been staring at that one a bit too long to miss it Smiley LOL

0 Likes