Is it possible to send a web link generated by lisp into a wscript to open a browser? Currently when I have the list open the browser it does not work. Not sure why.
Basically the user picks a window which will have coordinates to it. It then takes those coordinates to a web link, then opens the browser.
Here is the example I used
http://websoilsurvey.nrcs.usda.gov/app/WebSoilSurvey.aspx?marker=(-84.60032 46.23243)
Here is the web address pushed out from CAD.
http://websoilsurvey.nrcs.usda.gov/app/WebSoilSurvey.aspx?marker=(-87.076767%2039.886893)
Note: If I copy the address directly into a browser, it works.
This is the error I get from the website.
URL Errors
marker:
Invalid location marker: Invalid coordinate point "((-87.076767 39.886893))"
This is the info from the command line.
Pick the Area of Interest within Modelspace:
X,Y: 2954592.554323,1689496.162064
Projection SOURCE : IN83-WF
Projection CIBLE(Target) : WGS84 datum, Latitude-Longitude; Degrees
Longitude,Latitude: -87.076767,39.886893
This is the program. Make sure you set a coordinate system first to run it.
(defun c:soil (/ COORDS LONGLAT LONG LAT PROJDEST PROJSRC )
(setq PROJSRC (ade_projgetwscode))
(if (/= (getvar "ctab") "Model") (command "_layout" "Set" "Model"))
(ade_projsetsrc PROJSRC)
(ade_projsetdest "LL84")
(setq COORDS (getpoint "\nPick the Area of Interest within Modelspace: "));;; Pick a Window?
(setq LONGLAT (ade_projptforward COORDS))
(setq LONG (car LONGLAT))
(setq LONG (rtos LONG 2 6))
(setq LAT (car (cdr LONGLAT)))
(setq LAT (rtos LAT 2 6))
(setq PROJDEST (ade_projgetinfo "LL84" "description"))
(princ (strcat
"\n X,Y: " (rtos (car COORDS) 2 6) "," (rtos (cadr COORDS) 2 6)
"\n Projection SOURCE : " PROJSRC
"\n Projection CIBLE(Target) : " PROJDEST
"\n Longitude,Latitude: " LONG "," LAT
"\n"))
(setq Website (strcat "https://websoilsurvey.nrcs.usda.gov/app/WebSoilSurvey.aspx?marker=((" LONG " " LAT "))")) ;;http://websoilsurvey.nrcs.usda.gov/app/WebSoilSurvey.aspx?marker=(-84.60032 46.23243)
(command "_browser" Website)
(princ)
)
(C:soil)
Thanks for any help with this! Let me know if this does not make sense please.