Aaal-righty then,
I'm having a bit of a struggle here. Can you guys help me again, please.
This is what I currently have,
;
;;;get the bolt
;
(setq bolt (entget (car (nentsel "\nSelect Bolt... "))))
;
(setq pts (caddr bolt))
(setq pts (cdddr pts))
(setq pts (car pts))
And this is what is received,
Select object: ((-1 . <Entity name: 7efe4100>) (0 . "LWPOLYLINE") (330 .
<Entity name: 7efe40e8>) (5 . "2C0") (100 . "AcDbEntity") (67 . 0) (8 . "0")
(100 . "AcDbPolyline") (90 . 6) (70 . 1) (43 . 0.0) (38 . 0.0) (39 . 0.0) (10
-0.375002 0.649523) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 -0.750004 0.0) (40 .
0.0) (41 . 0.0) (42 . 0.0) (10 -0.375002 -0.649523) (40 . 0.0) (41 . 0.0) (42 .
0.0) (10 0.375002 -0.649523) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 0.750004 0.0)
(40 . 0.0) (41 . 0.0) (42 . 0.0) (10 0.375002 0.649523) (40 . 0.0) (41 . 0.0)
(42 . 0.0) (210 0.0 0.0 1.0))
Ok, so all's good, except the (40 . 0.0) parts.
I'm assuming these are in corrolation with the
(cdr (assoc 40 x));gets radius
mentioned by Ron.
And that's exactly what I'm receiving,
Command: (assoc 40 x)
(40 . 0.0)
Command: (cdr (assoc 40 x))
0.0
So it's not pulling the radius of the circle out of my block, right ?.?
What am I to do ??
... Aaah, I just discovered something. If I select the 6 sided polygon around the bolt, I get the (0 . "LWPOLYLINE") .
So the circle in the block has to be selected.
Is there a way where I can select the block like so,
(setq bolt (nentsel "\nSelect Bolt... "))
Command: (setq bolt (nentsel))
Select object: (<Entity name: 7e9320f8> (44.1575 42.7079 0.0) ((1.0 0.0 0.0)
(0.0 1.0 0.0) (0.0 0.0 1.0) (43.9475 43.0145 0.0)) (<Entity name: 7e932110>))
Then pull out what I need, something like,
(setq circle (entget (car (ssget "L"))))
To get
((-1 . <Entity name: 7e9320f8>) (0 . "CIRCLE") (330 . <Entity
name: 7e9320e8>) (5 . "2BF") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 .
"AcDbCircle") (10 0.0 0.0 0.0) (40 . 0.375) (210 0.0 0.0 1.0))
-- this obviously doesn't work as it is, can you show me how I would do it if it can be done ??