All Activity
- Past hour
-
AI suggestion not working - saved it to my menu ^C^C$M=$(if,$(==,$(getenv,ShowTabs),"0"),_setenv ShowTabs 1,_setenv ShowTabs 0) my acad replies: Command: setenv Unknown command "SETENV". Press F1 for help. Command: ShowTabs Unknown command "SHOWTABS". Press F1 for help. Command: 0 Unknown command "0". Press F1 for help.
- Today
-
ronjonp started following Copying layouts with vla-CopyObjects breaks drawing
-
Copying layouts with vla-CopyObjects breaks drawing
ronjonp replied to buntobaggins's topic in AutoLISP, Visual LISP & DCL
-
Standard texts are hiding somehow can anyone please help??
Vijay posted a topic in Student Project Questions
-
I wouldn't be too concerned about taking up AutoCAD processing, if you are out surveying then you probably aren't drawing? I'd do the LISP on demand though, say 'c:GNSS' whenever you want to plot the point, if you are wanting to use CAD while surveying - that way you are grabbing the point at the location you are at. LISP would probably work best by: Copy data file to say temp folder, read copied file, close copied file to avoid conflicts... so long as the receiver saves the data regularly and not just on closing the application. Might be the better option - can add in a DCL pop up to add data about the point recorded (what it is, and so on)
-
Change text color in AutoCAD Lt Tables Lisp request
MSHR replied to MSHR's topic in AutoLISP, Visual LISP & DCL
I attached sample file. Sample.dwg -
Danielm103 started following GNSS on AutoCAD
-
Change text color in AutoCAD Lt Tables Lisp request
MSHR posted a topic in AutoLISP, Visual LISP & DCL
Hi Folks, I'm looking for an existing AutoLISP routine before writing one from scratch. I need a Lisp for AutoCAD Tables (AcDbTable) that can detect text inside a table cell that has been separated using Alt+Enter (multiple lines within the same cell). The desired workflow is: Select one or more AutoCAD Lt tables. Scan every cell. Detect cells containing multiple lines (Alt+Enter line breaks). Display the cell location (row and column). Show each individual line with its line number. Ask which line should be modified. Ask for an AutoCAD Color Index (ACI). Change the font color of only that specific line, while preserving all other formatting in the cell (font, text height, bold, italic, stacked text, fields, etc.). Example: Cell (Row 3, Column 5) Line 1: Existing Text Line 2: New Text Line 3: Notes Choose line to recolor: 2 ACI Color: 1 (Red) Only Line 2 should become red. Has anyone already written a Lisp that does something similar, or knows of an existing solution? Any links, examples, or source code would be greatly appreciated. -
Automatically placing borehole tables with leaders without overlap
MSHR replied to MSHR's topic in AutoLISP, Visual LISP & DCL
No its mine, So sorry, I was involve with my project's. Please find the attached DWG file. Sample.dwg -
Perhaps it's easier than it seems. If it is an integrated receiver and Windows is able to obtain location data from it, then you should be able to access that data through the 'Windows Location API'. In that case, it should be possible to write a script to be executed from PowerShell that creates a loop to poll the receiver and write the data to a file. That loop would run in parallel with AutoCAD, allowing Lisp to read the new data as it is written. This method would be "intrusive", since it would occupy AutoCAD's command stream for as long as the command is running. However, there is another, less intrusive option that could operate in the "background": write the data to a system variable ('USERS#') and create a reactor that responds to changes in that variable: 'vlr-sysvar-reactor'. If the script is executed in a background PowerShell instance, you would also need to write a Lisp command capable of closing that instance when necessary. Once the script has been debugged, it could be incorporated into the Lisp code itself, making the whole solution completely self-contained. I haven't had much free time lately, but I'll try to investigate all of this a bit further.
-
Soeren Le Berre joined the community -
Hello. You might have to code a listener on COM or TCP/IP to read nmea stream (depending how you cast your GNSS stream). It is possible with .net to code a plugin that read a com port or TCP/IP stream and then follow the GNSS position in many ways. Inserting Block to the last position Drawing any entities following the GNSS position. Soeren Le Berre
-
Copying layouts with vla-CopyObjects breaks drawing
SLW210 replied to buntobaggins's topic in AutoLISP, Visual LISP & DCL
What are you trying to accomplish with this code? First and foremost vla-CopyObjects doesn't support Layouts in the manner you are attempting, AFAIK. You need to use -LAYOUT command or pretty much need to use LeeMac's Steal or at least determine the method he uses for Layouts, which if I am looking at it correctly uses the Block Table record maybe more as I quickly glanced at it. -
DWGDownload.Com joined the community
-
RCMR joined the community
-
Applications that use location services include Windows Maps and Google Earth, for example. There are probably more specialized applications, but I suppose those two are the best known and the best documented.
- Yesterday
-
Copying layouts with vla-CopyObjects breaks drawing
BIGAL replied to buntobaggins's topic in AutoLISP, Visual LISP & DCL
Why not just use "Layout T" Template it asks for the dwg and which layout i have always used it and no problems. Can run as a (command -
Copying layouts with vla-CopyObjects breaks drawing
buntobaggins replied to buntobaggins's topic in AutoLISP, Visual LISP & DCL
I am aware of the Steal program but for this project I would like to write my own implementation. -
mhupp started following Copying layouts with vla-CopyObjects breaks drawing
-
Copying layouts with vla-CopyObjects breaks drawing
mhupp replied to buntobaggins's topic in AutoLISP, Visual LISP & DCL
https://www.lee-mac.com/steal.html (Steal "C:\\My Folder\\MyDrawing.dwg" '(("Layouts" ("Page1" "Page2")))) -
I worry that information will become like entertainment. We used to have a few TV channels, they were free, and we trusted their information. Then came cable, which grew into a mess of garbage that came through one provider, so you paid for things you mostly didn't want. Then came streaming, which is turning into a handful of providers with even more garbage, and you pay for each provider. AI may turn out like that: a few providers, with answers of questionable quality, at prices we can't afford. What would make sense to me is to create repositories of knowledge, curated by an AI. As it is, you have to ask similar questions, and the AI starts from scratch every time. Wouldn't it make more sense to treat the AI like someone with institutional knowledge? If you had a repository for AutoLISP code, for instance, all of us could contribute to it and maintain it. You might have to pay for your answer, but you would know it was correct and useful.
-
Just like the VLIDE, Visual Studio, Visual Studio Code, etc., you still need to learn to properly us AI to get the code corrected. As I mentioned, Fora were getting slow long before the current AI explosion and particularly for LISP, lots of answers already posted. Many new questions are to alter an existing code to add functionality, that could be easier with AI for someone somewhat familiar with LISP. I still see daily or near daily new member sign ups on CADTutor with out posting, I would presume to download a posted code, since that requires being logged in vs copying and pasting from a code in code tags.
-
Deon Eybers joined the community
-
Rey G joined the community
-
may7 joined the community
-
Like @Steven P How do you look at the data now ? Is it just displayed when you run a program ? If so what is the program ? Some one must have written it.
- Last week
-
Danielm103 started following AI taking over
-
I think there’s other reasons too! CAD, VisualLISP, have been around for more than a quarter century, AutoLISP, like 40 years, either people have moved on to other software packages, or use an already existing solution People at stack overflow started to complain about it being toxic, people downvote legitimate questions where the question was a bit hard to understand, i.e. where the OP’s first language isn’t English. I use the heck out of AI though; I even run local models. The issue is, people expect LLMs to “one shot” solutions, it’s unlikely to happen. If you spend time and find a system to work with the models, they are amazing.
-
Felix Carter joined the community
-
buntobaggins joined the community
-
Copying layouts with vla-CopyObjects breaks drawing
buntobaggins posted a topic in AutoLISP, Visual LISP & DCL
I am currently writing a program that will take layouts defined in a template file and copy them over to the current drawing. But running this program will cause the the file to break. The new layouts will not show up and if you attempt to switch to a different layout AutoCad will crash. If you try to open the file up again AutoCad will say its corrupted and will repair the file which seems to fix the problem. (defun c:copyLayouts () (vl-load-com) (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) (setq impdwg (getfiled "Select Master Template" "" "dwt" 16)) (setq impdoc (vla-getinterfaceobject (vlax-get-acad-object) (strcat "ObjectDBX.AxDbDocument." (itoa (atoi (getvar 'acadver)))) );vla-getinterfaceobject );setq (vl-catch-all-apply 'vla-open (list impdoc impdwg)) (setq layoat (vlax-get-property impdoc 'layouts)) (setq safeLayout (vlax-make-safearray vlax-vbObject (cons 0 (- (vla-get-count layoat) 1)))) (setq i 0) (repeat (vla-get-count layoat) (vlax-safearray-put-element safeLayout i (vla-item layoat i)) (setq i (1+ i)) );repeat (vla-CopyObjects impdoc safeLayout (vlax-get-property doc 'layouts)) (princ "\n\ncopy done\n\n") (princ) );defun This only seems to be a problem with layouts. Using the same code for say a UCS works just fine. This is probably just some stupid mistake but I have been stuck on this for a while now so any help would be appreciated. -
Are you able to dive into Windows itself a little - been a while since I needed to do anything similar though so this might not be possible. Close everything and set the receiver going, record some data, say 5 mins or something. Windows of old let you search the whole system for every file... might be able to limit that to 'modified in last hour' (or whatever). This might bring up the saved data, might be able to open in notepad and see if it is encrypted / compressed (all the weird characters) or raw data. If is is raw data then you are away and running able to read and modify as you want. Think you would need to show hidden and system files to get the best chance of finding the data. Might work.
-
As an dilettante, I want to say that AI exists only thanks to professionals like you. All the training materials and a lot of codes are written by real people. Therefore, all the applause is for you and only for you!!!
-
As I mentioned, it is an integrated u-blox M8N receiver built into the motherboard of a Unistrong UT50 tablet PC running Windows 10. It is a tablet that is about 10 years old, so it has already been discontinued.
-
AI is definitely seeing more use. At work myself and one other are generally maintaing our AutoLISP libraries. I only started learning around 2021 as it is while he's been doing it alot longer. We've both made attempts at creating CoPilot agents to help ourselves out and see what it does. I know other CAD users have used various AI to spit out AutoLISP commands to make life easier which is fine. But thankfully they had the foresight to come to one of us when it didn't work. I've been pushing for not an outright ban on AI coded AutoLISP but trying to get all code passed through myself or the other guy as a few I've seen so far when help was asked for were deleting files out of shared directories. Which of itself wasn't terrible as they were temporary files that were being created by the subfunction but blindly testing something with that level of access worried myself, the other guy and two of our CAD managers.
-
abdalrhman joined the community
-
Some suggestions. Go back to who you bought the device from, they may have something. If it was say Amazon not sure. Look on the manufacturers web site for more info contact them. Brand, model etc ?
-
Parametric wardrobe, kitchen & cabinet automation in AutoLISP — anyone working on similar?
zenmar replied to zenmar's topic in BricsCAD
"Thanks for confirming. That completely locks in my decision to statically link SQLite into the BRX—it's clearly the only safe way forward to avoid process space conflicts. DuckDB and Arrow are powerful, but definitely overkill for a parametric generator framework. Keeping it clean with zero external DLL dependencies is the way to go."
