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,963 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,964 Views
20 Replies
Replies (20)
Message 2 of 21

Sea-Haven
Mentor
Mentor

Maybe use zoom c pt scale as you can set a suitable scale as you are working with field survey.

0 Likes
Message 3 of 21

john.uhden
Mentor
Mentor

I'm having trouble understanding this scenario.

It seems as though your field crew data-collects points and adds descriptions that you then import into the drawing with associated blocks (using Civil 3D or a similar app).  And then you want to locate redundant ADA shots (within 10' of another)?

Maybe it would be better if you had a routine that highlights ADA blocks that are within 10' of another.  Then the drafter can zoom (if necessary) and erase one of the blocks of his choice.  Am I anywhere close on this?

The highlighting could be performed most easily by (sssetfirst), but could be exaggerated by surrounding each pair of redundants with a fat donut of some glaring color like 230 (fuscia).

Even better might be to have the routine automatically erase each of the redundants.

John F. Uhden

0 Likes
Message 4 of 21

mmitchellH6TRW
Enthusiast
Enthusiast

Our field crews collect lat & long while sitting over a field feature. They give us .csv files with records that include lat long and lot of other data. My lisp sorts the data into blocks (bn) placed on layers (layer) at scale (scale) on a point (pt) that has been transformed from the lat and long.

 

We recently added the ADA to the code. This code works. It places the first ADA block, and ignores the rest attempting to be placed within 10' of the first. Give it a try. Create a block with text ADA named ADA. Run this code. An ADA block is placed. Change the point of insertion by less than 10. Run the code again. No additional block is placed. 

 

Comment out the Zoom code. Pan so that the newly placed ADA block is off of the screen. Run the code.

A new block is placed close to the original.

 

What I need is a better solution to make the first happen. Preferably one that does not need to zoom to each location to use, as it seems that ssget won't process if there is not focus.

 

 

0 Likes
Message 5 of 21

john.uhden
Mentor
Mentor

OK.  Try this approach...

Presuming all the ADA shots are in one CSV, as you add a shot (without zooming anywhere) store the location in a list.  Then before inserting the next one, see if it is within 10' of any point already in the list.  If it is, then don't insert.  If it isn't then do insert and add the location to the list.  The list does not need to be sorted since each point iteration will create a short list using (vl-remove if ...).  If the short list is empty, then it's okay to make the insertion.

Now if the data collection takes days, with multiple CSVs, then do an (ssget "X") of all the ADAs already in the drawing and store their locations in the list before running the rest of your insertion routine.

If you have any questions, ask @Sea-Haven or @beekeeCZ  (oops, she's changed her ID) or any of the others smarter than I.  🙂

John F. Uhden

Message 6 of 21

Sea-Haven
Mentor
Mentor

I am a bit dumb to0, even though an ex civil software dealer no idea what is a ADA various countries call things differently.

0 Likes
Message 7 of 21

mmitchellH6TRW
Enthusiast
Enthusiast

ADA is an American Disabilities Act ramp. A ramp at the corner of sidewalks at an intersection of roadways to allow wheelchairs and others to pass unhindered by the curb. In the USA these are defined by law. In some jurisdictions (LA and Orange counties, in California) we are required to show their locations on maps associated with a request for permits.

0 Likes
Message 8 of 21

Sea-Haven
Mentor
Mentor

ADA = Pram crossing and while I am at it  don't forget the TGSI's. Image field survey.

 

Pram cross.lsp does as name implies draws the crossing into the kerb.

 

0 Likes
Message 9 of 21

Sea-Haven
Mentor
Mentor

Typical field survey yes no Tgsi's in this survey

screenshot250.png

0 Likes
Message 10 of 21

dbroad
Mentor
Mentor

In the image, I only see 2 locations where curb cut ADA ramps would appear and if required, I would prefer the symbol to be place midway along the ramp, not at one endpoint.  Why even draw the ADA symbol?  Just tag the ramps.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 11 of 21

john.uhden
Mentor
Mentor
American Disabilities Act.
I presume he means a handicap symbol.

John F. Uhden

0 Likes
Message 12 of 21

mmitchellH6TRW
Enthusiast
Enthusiast

This is what our typical survey looks like:

mmitchellH6TRW_0-1599844473714.png

 

0 Likes
Message 13 of 21

john.uhden
Mentor
Mentor
Accepted solution

That's amazing that your surveyors pick up every pavement marking, automobile (moving or not), and rooftop air handler.  OMG, even shadows.  Why, it's enough to be a photograph! 😬

Did you catch my drift about the (vl-remove-if) usage?  Oops, that should be (vl-remove-if-not).

Set plist to be the list of previously inserted ADA points (x y z).

Then...

(defun near (p plist dist)

  (vl-remove-if-not '(lambda (x)(equal p x dist)) plist)

)

(if (not (near p plist 10.0))

  (progn (do_insert)(setq plist (cons p plist)))

)

But watch out for the Z value.  You can use...

(defun 2d (p)(list (car p)(cadr p)))

as in

(setq plist (mapcar '2d plist))

and

(setq p (2d p))

John F. Uhden

Message 14 of 21

mmitchellH6TRW
Enthusiast
Enthusiast

Thank you John.

0 Likes
Message 15 of 21

Sea-Haven
Mentor
Mentor

TGSI tactile ground surface indicator its for the visually impaired to know the direction to walk its little buttons in a grid. If we asked our surveyors to pick it up would appear on a layer tgsi and be normally a 4 sided pline. So could find the centre pretty easy, checking points on layer / pline. As no dwg hard to check.

 

Just a comment all our road plans have a aerial image handy for checking stuff, the quality has been continually improved.

 

What is of interest wheel chair standard in the world does one exist for design of pram ramps ? Width does, no ht to footrest, distance from footrest to wheel centre  etc, we have ramp angles, but what happens when a path is on the side of a hill almost impossible to meet the grades. Wont go in to it but had complaints from a custom wheel chair user.

 

0 Likes
Message 17 of 21

john.uhden
Mentor
Mentor
Does the Outback really need handicap regulations?

John F. Uhden

0 Likes
Message 18 of 21

mmitchellH6TRW
Enthusiast
Enthusiast

In the real world of the disabled, ramps are better than no ramps, but ramps are obstacles. On a long ramp, the more landings the better. I didn't see any length spec in the short description but I know from personal experience that 15' going up a ramp is a long time to be working your way along without a rest. And I was a young man when I experienced that. Now..... I would't make it. I have seen chair elevators that attach to the handrails of steep stairways. That is the way to go. Just roll in, strap in, and ride.

0 Likes
Message 19 of 21

mmitchellH6TRW
Enthusiast
Enthusiast

No, for outback you either move on crutches or you just sit there. The outback isn't made for broken men.

My friend John Buxton climbed Mt. Rainer with his friends on any Saturday. (Most people plan the trip for a fast three day assent or a modest paced week. But these were big men.) After recovering from a near fatal car crash off the old West Seattle bridge, he never climbed again. He sat and painted huge canvases of mountains that he had climbed in his youth. He did enjoy scuba diving. "It's like being weightless. I just weighted down my legs and they just floated behind me."

 

As for your real question. Should there be the same regulations for the outback as in the city.
I don't think so. They are different environments. Some of our national parks have special handicap accessible trails. That is nice (something special) for the handicapped. It is also nice for very young children. But handicap regulations should be for the city where they are more likely to live and work. (That is my personal option. I don't know how the law is currently written.)

0 Likes
Message 20 of 21

john.uhden
Mentor
Mentor
I think in the US, or at least in New Jersey, the max ramp slope is 8% and
you have to have a 5' (or maybe that's 8') landing for each 30" of rise.

John F. Uhden

0 Likes