Lisp to search street names and return a grid number

Lisp to search street names and return a grid number

Anonymous
Not applicable
1,157 Views
3 Replies
Message 1 of 4

Lisp to search street names and return a grid number

Anonymous
Not applicable

I'm looking for a lisp that will search for a specific street name (which is an x-ref drawing) and return the name of the grid number that the street lies inside (the grid numbers are on the masterplan).

Any advice appreciated...

Dan

Lispquery.PNG

0 Likes
Accepted solutions (1)
1,158 Views
3 Replies
Replies (3)
Message 2 of 4

3wood
Advisor
Advisor
Accepted solution

I think it is one of the function in ArcGIS. I guess there are also some add-ons in AutoCAD.

You situation is a bit complicated because as I can see, the street name may be a few individual texts, you would find it if you search is based on the full street name. Also the street may across a few grids. Furthermore, sometime a street may not be continuous,  it could be a few parts but share the same street name. 

You may need upload a sample drawing so people can get more detailed information.

Message 3 of 4

Anonymous
Not applicable

These are the files.

 

Also, I have discovered an autocad application known as 'gaz'. If anyone has come across this, this is the lisp routine.

(defun c:gaz ()
(setvar "cmdecho" 0)
(dos_exewait "p:\\common\\osmaps\\gaz\\gaz.exe" 0)
(setq ga1 (dos_clipboard)
      ga2 (substr ga1 17 127))
;(command ga2)
(setq ab (open "c:\\maptemp.scr" "w"));cannot use p:\ because most users don't have write access
(write-line ga2 ab)
(close ab)
(if (= (getvar "tilemode") 0)(command "mspace"))
(command "script" "c:\\maptemp")
(setvar "cmdecho" 1)
(princ)
)

 

 

0 Likes
Message 4 of 4

Anonymous
Not applicable

I have also created an excel file with all the street names and which grid the street name belongs to (to get around the issue of which tile a street belongs to...)

 


@3woodwrote:

Also the street may across a few grids.


 

0 Likes