Jump to content

Recommended Posts

Posted

Hello,
I'm back here once again to bring up a very interesting topic:
How can AutoCAD (installed on a Windows 10 tablet with an integrated GNSS receiver) be made to display its real-time UTM position (or latitude/longitude), for example through a block?
Is this possible?
Are there any Lisp routines capable of achieving this?

  • Like 1
Posted

Not sure, can the GNSS write / overwrite or updated a text file continuously? Reading a text file is easy with CAD, copy that to a block and the rest is all possible -  not sure the interface yet.

 

BigAl might know something later today.

  • Like 1
Posted

I don’t really understand how a GNSS receiver works.
It seems that most of them operate by sending data to a port.
The receiver is a u-blox device.

Posted (edited)

Would need a Reactor and connect to some type of database.

Edited by mhupp
  • Thanks 1
Posted

Like @mhupp may need to run an external program that writes current location to a file, then you can read that file and update say text. Depending on the program may run a BAT file or run the program or use powershell to run. I think can look at a file date has changed via reactor but manual much easier.

 

I did a Google and did start to find hints of save to a txt or csv file but that is as far as I went. It is something you need to do, yje googling.  Talk to who you bought the device from they may have something.

  • Thanks 1
Posted

I think you would need Python, .NET, or ObjectARX as Autolisp does not have an on idle event that I can see.

According to AI, you can read the input stream in a background thread, then use AutoCAD’s on idle event to update geometry in AutoCAD. I asked AI about using PyRx and it spit out a bunch of code converting $GPGGA $GNGGA to Lat/Log and stuff, I attached it.

 

scratch.txt

  • Thanks 1
Posted

Thanks for the replies.
It seems that, despite the passage of time, this is still a very rarely discussed topic. I have only found one very old thread dealing with this issue, but it approaches it from VBA and does not appear to reach a solution:


https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/reading-gps-output-on-a-serial-port-with-vba/td-p/624634&ved=2ahUKEwif9v7MqpqVAxWuHDQIHXXNAncQFnoECCQQAQ&usg=AOvVaw2qjyYBboSx0JnXyKbmPsbU⁠�


I suppose this is not something that is easy to achieve from Lisp.
I’m not sure I fully understand the @BIGAL idea of using an external program: do you mean a program that does all the work from outside AutoCAD?
(I may not have understood correctly.)
Thanks, @Danielm103. I’ve never used Python with AutoCAD before. Perhaps this is the right time to start doing so 

 

I really think this topic deserves a thread that finally results in the solution that nobody has managed to find so far.

Posted

Your trying to talk to an external device, something that Autocad was never really designed  to do out of the box.. Other than say a Digitiser. Yes in survey software including CIV3D there are programs that talk to survey instruments, but some one has writen say a .NET interface to do the talking part. So you need a external program Python may do it for you, Lisp is a pretty low level language when it comes to interfaces. You need functions that do that and they are probably not built into the Lisp interpreter. Bricscad has added lisp functions to its software they are not available to say Acad as improvements.

 

In the case of mobile phone photos I used a 3rd part program to read the details from the jpg images so could get the lat and long and insert in a dwg at correct location. Using lisp could call the other external program. look at Startapp can call a bat file.

 

"Need a thread" then why not talk to hand held distance measures, I am sure others would come up with other devices also that they would like plug and play.

Posted

Yeah, my thought would be to use an external app to talk to the receiver, save the coordinates to a text file somewhere continuously - probably by overwriting a simple text file 'X-Coord Y-Coord Z-Coord Description' - same format all the time - all done outside of CAD.

 

Have CAD running and using a delay (https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-delay-command-in-scripts/td-p/5497881 for an example) get CAD to read this file as necessary, plot the point

Posted

An external application?

Wich one?

Is there any software available that can do this?

Posted

In real time? I think is saw one for like $300 will post later tonight.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...