Author Topic: Automatically run "Geographiclocation" and input set variables in AutoCAD  (Read 1459 times)

0 Members and 1 Guest are viewing this topic.

Windsor

  • Mosquito
  • Posts: 14
Hi there,

I'm looking to try and figure out a way to automatically run the "Geographiclocation" command and fill in parameters that are asked for.
The selected values will always be the same, I'm just looking to find a quicker way to run the command without having to manually input the information each time.

Attached is a .txt document outlining the process of inputting the correct information at each step.

If there is anything that I can clarify plase let me know, or even let me know if this is possible todo in the first place.

Any help would be greatly appreciated.

VovKa

  • Water Moccasin
  • Posts: 1626
  • Ukraine
(setvar "LATITUDE" Deg) and (setvar "LONGITUDE" Deg)?

Windsor

  • Mosquito
  • Posts: 14
Hi Vovka,

What I am trying to do is run through the Geographiclocation dialogue box using lisp to input set values (these will never change as I am inputting information to load a map in a set co-ordinate system), see snip 1 attached.

Essentially what I want to do is run the GEOGRAPHICLOCATION command, than set location from MAP, than input the values from snip 1, select DROP MARKER HERE than "next", than select ITM co-ordinate system from the list, set drawing unit to Meters (see snip 2), than type the point for location as "600000,750000,0", than to specify the north direction angle as 90 degrees.

If there is any further clarification needed please let me know

VovKa

  • Water Moccasin
  • Posts: 1626
  • Ukraine
you can set the world coordinate system with this Map's api function (ade_projsetwscode "ITM")

CodeDing

  • Newt
  • Posts: 50
Vovka,

AFAIK, the (ade_ ...) functions only work with Map 3D or Civil 3D, it appears that OP is using original AutoCAD.

Windsor,

I have looked into this ability many times from a lisp approach with no such luck. A .NET function could be written to supplement your code, but I would not be able to provide a function like that anytime soon. A bit above my level I'm afraid.

There may be workarounds based on your situation though.. Do you require inputting a SPECIFIC coordinate every time or do you merely need the coordinate system assigned? You could assign the coordinate system once as part of a template and just use your template every time??

Best,
~DD
~DD
Senior CAD Tech & AI Specialist
Need AutoLisp help?
Try my custom GPT 'AutoLISP Ace'

VovKa

  • Water Moccasin
  • Posts: 1626
  • Ukraine

VovKa

  • Water Moccasin
  • Posts: 1626
  • Ukraine
as a Map3d user i do not understand what is the point of assigning a coordinate system in plain Acad?
what is it used for?

CodeDing

  • Newt
  • Posts: 50
it appears that OP is using original AutoCAD.
https://www.theswamp.org/index.php?topic=49001.msg541634#msg541634
Man, I love stumbling into some good 'ol useful code on the forums. Nice execution!

as a Map3d user i do not understand what is the point of assigning a coordinate system in plain Acad?
what is it used for?
I worked for a telecommunications company that would always draft towers in plain AutoCAD, but sometimes we would receive land surveys, we would use the geolocation to view imagery of the site and import correct scaling sometimes thanks to geolocation. I almost enjoy the simplicity of just geolocating in ACAD sometimes.. It's faster than C3D (which I would bounce between sometimes) and also less expensive if you can squeeze what you need out of it. I've created a couple tools that I would retrieve information from ArcGIS REST services which I could bring in to Acad also, as long as you can retrieve the coordinates in Lat / Long.  :-)
~DD
Senior CAD Tech & AI Specialist
Need AutoLisp help?
Try my custom GPT 'AutoLISP Ace'

VovKa

  • Water Moccasin
  • Posts: 1626
  • Ukraine
I worked for a telecommunications company that would always draft towers in plain AutoCAD, but sometimes we would receive land surveys, we would use the geolocation to view imagery of the site and import correct scaling sometimes thanks to geolocation. I almost enjoy the simplicity of just geolocating in ACAD sometimes.. It's faster than C3D (which I would bounce between sometimes) and also less expensive if you can squeeze what you need out of it. I've created a couple tools that I would retrieve information from ArcGIS REST services which I could bring in to Acad also, as long as you can retrieve the coordinates in Lat / Long.  :-)
thanx for the explanation, CodeDing

i've have also written a tool to get some remote imagery into plain acad
more info and download link is here https://www.theswamp.org/index.php?topic=47908.0

d2010

  • Bull Frog
  • Posts: 323
I worked for a telecommunications company that would always draft towers in plain AutoCAD, but sometimes we would receive land surveys, we would use the geolocation to view imagery of the site and import
:glarestraight:
Please, you hire him Mr. Vovka on odesk.com or from eMarket on freelancer.com with a personally-contract.

Ps== Sharing everyone, a freeware solution for "bussines company" ..
They steal the money$  from the eMarket and Mr. "CodeDing" bankrupt the
UsA-Army? (the subject They="bussines company" )
(e.g. ChineseHacker steal again the public solution.lisp.vlx for CodeDing..because the www.swamp forum lisp is a public-contract).

 :whistling:
very important=Please you hire him Mr. Vovka for 1000$ , personally contract..not on the public;;
1000$ price from "telecommunications company" is vax, vax vax is nothing,
1000$ price= is zero-of("hi-tech") inside They=.
Code: [Select]
Mr. Chinese hacker,  steal again, and again, and again the public solution.lisp
for mr. CodeDing.and others .Mr.IranHacker can steal again, again, and
again the program.lisp for mr. CodeDing..?>
:tickedoff:


« Last Edit: August 14, 2022, 07:32:14 AM by d2010 »

tombu

  • Bull Frog
  • Posts: 288
  • ByLayer=>Not0
ArcGIS for AutoCAD
Free Plug-In for AutoCAD Connects You to ArcGIS
https://www.esri.com/en-us/arcgis/products/arcgis-for-autocad
Tom Beauford P.S.M.
Leon County FL Public Works - Windows 7 64 bit AutoCAD Civil 3D