Placing only one block of kind ADA in an approx 10' circle

Placing only one block of kind ADA in an approx 10' circle

mmitchellH6TRW
Enthusiast Enthusiast
1,977 Views
20 Replies
Message 1 of 21

Placing only one block of kind ADA in an approx 10' circle

mmitchellH6TRW
Enthusiast
Enthusiast

My field crew sometimes record more than one shot on an ADA ramp. I only need one ADA block per ramp.

code that selects bn ; bn block name
and               pt ; pt point to insert block
etc.
.
.
.
(setq   bn "ADA"          ; stub in bn
        pt '(100 200 0)   ; stub in pt
        layer "Sidewalk"  ; stub in layer
        scale 40.0        ; stub in scale
)
(if 
    (or 
    (and 
        (= bn "ADA")
        (and 
        (not 
            (command-s 
            "zoom"
            (polar pt 
                    2.3561945
                    20.0
            )
            (polar pt 
                    5.4977871
                    20.0
            )
            )
        ) ; (not negates nil returned after successful zoom
        (not 
            (ssget "_C" 
                    (polar pt 
                        2.3561945
                        10.0
                    )
                    (polar pt 
                        5.4977871
                        10.0
                    )
                    '((0 . "INSERT")
                    (2 . "ADA")
                    )
            )
        ) ; no ADA exists in aprox 10'
        ) ; (and zoom test
    ) ; (and (= bn "ADA")
    (/= bn "ADA")
    ) ; (or 
    (entmake 
        (list (cons 0 "INSERT") 
                ; place block on pt
                (cons 100 "AcDbEntity")
                ; 100 Entity Code
                (cons 8 layer) ; The Layer
                (cons 100 "AcDbBlockReference")
                ; 100 Entity Block
                (cons 2 bn) ; block name
                (cons 10 pt) ; insertion point
                (cons 41 (/ sc 40)) ; x scale
                (cons 42 (/ sc 40)) ; y scale
                (cons 43 (/ sc 40)) ; z scale
                (cons 50 0) ; insertion angle
        ) ; list
    ) ; entmake (list '(0 . "INSERT")
) ; (if bn

This code works but there has to be better code. Something that does the ssget trick without running all over giving focus to ssget so it can be visual. Or some way to turn ssget's visual requirement off. As it is this routine is called for each block and the drafter is left staring at the last ADA block entered (other blocks don't change the focus.)

 

Please. Thank you for your attention.

0 Likes
Accepted solutions (1)
1,978 Views
20 Replies
Replies (20)
Message 21 of 21

Sea-Haven
Mentor
Mentor

Had a look at the ADA regs etc same here in AUS there are standards. The real issue is not the ramps but the wheel chairs there is no standard so if you build a ramp meeting code what shape do you check it against. That was the problem with the custom wheel chair the man was tall so foot rests were set lower and would hit on some pram crossings. Other wheel chairs no problems. I should also like to point out where I worked 190,000 residents, and a significant footpath budget, any problem pram crossings were looked at carefully.

 

The issue is in the shape of the tray of the kerb then the ramp grade up.

0 Likes