PGia Posted Friday at 12:05 PM Posted Friday at 12:05 PM 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? 1 Quote
Steven P Posted Friday at 02:09 PM Posted Friday at 02:09 PM 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. 1 Quote
PGia Posted Friday at 02:36 PM Author Posted Friday at 02:36 PM 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. Quote
mhupp Posted Friday at 06:54 PM Posted Friday at 06:54 PM (edited) Would need a Reactor and connect to some type of database. Edited Friday at 06:54 PM by mhupp 1 Quote
BIGAL Posted Saturday at 12:44 AM Posted Saturday at 12:44 AM 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. 1 Quote
Danielm103 Posted Saturday at 08:46 AM Posted Saturday at 08:46 AM 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 1 Quote
PGia Posted 1 hour ago Author Posted 1 hour ago 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. Quote
Recommended Posts
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.