Jump to content

All Activity

This stream auto-updates

  1. Today
  2. Search in my website for the program: Import Layouts. https://AutolispPrograms.wordpress.com
  3. PGia

    GNSS on AutoCAD

    I think what you're saying makes a lot of sense, @Steven P I often identify locations in an AutoCAD drawing where there are questionable features that I need to verify on site. The idea is to use AutoCAD itself to navigate to each location, edit the drawing, and capture additional points if necessary, without having to export and import data through intermediate applications. I suppose this is something that many people have had in mind for quite some time.
  4. Admin may want to merge the two posts about this task, questions asked on other post, information is missing that is needed to provide a solution. Where is table data source ?
  5. Need some more clarification, you ask for multi line to be different colors, but you have table that are multi row, not Multi line cells. That is a big difference. So if you just want tables with a heading and one row to be red, then any others with header and rows greater than 2 will be heading Red line rest green 87 lines. That can be done. I think need to go back a step and work on the table creation in your other post as you pick boreholes there is no reason why the colors can not be set then. So will have a go at the other post, making single table for multiple boreholes much easier than trying to place individual tables for each borehole. Will post something for you to say yes that is ok. I did ask about the source data where is the say Excel or csv that has the values that are being used in your tables, you have supplied a half answer.
  6. Back to your code, using OBDX you get the layout list like this. ; example code by AlanH June 2026 (setq fname (getfiled "Select dwt File" "D:\\alan" "dwt" 16)) (setq impdoc (vla-getinterfaceobject (vlax-get-acad-object) (strcat "ObjectDBX.AxDbDocument." (itoa (atoi (getvar 'acadver)))) ) ) (vl-catch-all-apply 'vla-open (list impdoc impdwg)) (setq layout (vlax-get-property impdoc 'layouts)) (setq lst '()) (vlax-for lname layout (setq lst (cons (vlax-get lname 'name) lst)) ) (if (not AH:Butts)(load "Multi Radio buttons.lsp")) (if (= but nil)(setq but 1)) (setq ans (ah:butts but "V" (cons "Please choose" lst))) (command "layout" "T" lname ans) You can then feed that lst to say a dcl and choose, this is using a library function that returns the layout name, save multi radio buttons in a support path or edit the (load to full path where saved. It will work for up to about 20 layout names, a screen limitation. Give it a try let me know how it works, Multi radio buttons.lsp
  7. Yesterday
  8. As the cell is Mtext you can set each line a different color, using the mtext color control. This was done manually. So will see maybe later will have time to do something. Have an idea will find the cells with multi line split into multi text lines, display the line and what color it is now so you can change any or all lines. Looking at dwg it looks like you only want 2 colors 1 & 87 so will keep the multi color for later.
  9. Really the concern is if system set/getenv can be used in a macro, and using it for visibility as with: ID_BouReg [$(if,$(and,$(getvar,hpbound),1),!.)Polyline BOundary ]$M=$(if,$(and,$(getvar,hpbound),1), setvar hpbound 0, setvar hpbound 1) regenall which is the switch (the $if..,!.) for poly/region of boundary which shows with a 'check when set to polyline.
  10. 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.
  11. You can also use Design Center ( DC ) to copy layouts amongst other things between drawings.
  12. Steven P

    GNSS on AutoCAD

    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)
  13. I attached sample file. Sample.dwg
  14. 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.
  15. No its mine, So sorry, I was involve with my project's. Please find the attached DWG file. Sample.dwg
  16. GLAVCVS

    GNSS on AutoCAD

    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.
  17. Soeren Le Berre

    GNSS on AutoCAD

    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
  18. 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.
  19. PGia

    GNSS on AutoCAD

    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.
  20. Last week
  21. 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
  22. I am aware of the Steal program but for this project I would like to write my own implementation.
  23. https://www.lee-mac.com/steal.html (Steal "C:\\My Folder\\MyDrawing.dwg" '(("Layouts" ("Page1" "Page2"))))
  24. CyberAngel

    AI taking over

    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.
  25. SLW210

    AI taking over

    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.
  26. BIGAL

    GNSS on AutoCAD

    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.
  27. Danielm103

    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.
  1. Load more activity
×
×
  • Create New...