Jump to content

Leaderboard

  1. BIGAL

    BIGAL

    Trusted Member


    • Points

      10

    • Posts

      20,133


  2. SLW210

    SLW210

    Moderator


    • Points

      6

    • Posts

      11,651


  3. GLAVCVS

    GLAVCVS

    Community Member


    • Points

      6

    • Posts

      876


  4. pkenewell

    pkenewell

    Community Member


    • Points

      4

    • Posts

      798


Popular Content

Showing content with the highest reputation since 06/26/2026 in Posts

  1. Here's a simple Lisp routine for obtaining data from an integrated GNSS receiver. It works by sending a small script to PowerShell, which writes the data to a file named 'pos.txt' saved in the Documents folder. I've only tested it on a single device, but it should work on any device equipped with an integrated GNSS receiver. The data is stored in latitude/longitude format, so each user will need to transform those coordinates into the desired coordinate reference system. To stop logging the data, simply close the PowerShell window This is just a starting point for anyone who wants to adapt it to their own needs. ;************************ G L A V C V S ************************* ;************************** F E C I T *************************** ;;;THIS CODE STARTS GNSS RECEIVER AND WRITES DATA TO A FILE CALLED 'pos.txt' IN THE My Docments FOLDER (defun startGNSS (/ cmd sh dir cad ur) (setq dir (VL-REGISTRY-READ "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders" "Personal" ) ) (if (setq sh (vlax-create-object "WScript.Shell")) (progn (if (and (or (setq ur (getint "\nUpdate rate (milliseconds) <1000>/2000/3000/5000 : ")) (not ur)) (member ur '(nil 1000 2000 3000 5000))) (progn (setq cad (strcat "Add-Type -AssemblyName System.Device" (chr 13) (chr 10) "# 1) Conectar con AutoCAD abierto" (chr 13) (chr 10) "$outFile = \'" dir "\\pos.txt\'" (chr 13) (chr 10) "try {" (chr 13) (chr 10) " $acad = [Runtime.InteropServices.Marshal]::GetActiveObject(\'AutoCAD.Application." (itoa (atoi (getvar "ACADVER"))) "\')" (chr 13) (chr 10) "}" (chr 13) (chr 10) "catch {" (chr 13) (chr 10) " Add-Type -AssemblyName System.Windows.Forms" (chr 13) (chr 10) " [System.Windows.Forms.MessageBox]::Show(" (chr 13) (chr 10) " \'Por alguna razón no se pudo conectar con AutoCAD mediante COM.\' + [Environment]::NewLine + $_.Exception.Message," (chr 13) (chr 10) " \'GNSS-}AutoCAD: Error de conexión\'," (chr 13) (chr 10) " [System.Windows.Forms.MessageBoxButtons]::OK," (chr 13) (chr 10) " [System.Windows.Forms.MessageBoxIcon]::Error" (chr 13) (chr 10) " )" (chr 13) (chr 10) " exit" (chr 13) (chr 10) "}" (chr 13) (chr 10) "# 2) Crear y arrancar receptor de ubicación Windows/GNSS" (chr 13) (chr 10) "$w = New-Object System.Device.Location.GeoCoordinateWatcher" (chr 13) (chr 10) "$w.Start()" (chr 13) (chr 10) "# 3) Bucle continuo: comprobar estado, obtener posición y escribir en USERS5" (chr 13) (chr 10) "while ($true) {" (chr 13) (chr 10) " $doc = $acad.ActiveDocument" (chr 13) (chr 10) " $status = $w.Status" (chr 13) (chr 10) " $p = $w.Position.Location" (chr 13) (chr 10) " $time = Get-Date -Format \'dd-MM-yyyy HH:mm:ss\'" (chr 13) (chr 10) " if ($status -eq \'Disabled\') {" (chr 13) (chr 10) " $line = \'*** GNSS ERROR: GNSS disabled ***\';;;;;;\"" (chr 13) (chr 10) " }" (chr 13) (chr 10) " elseif ($status -eq \'Initializing\') {" (chr 13) (chr 10) " $line = \'*** GNSS ERROR: Searching... ***\';;;;;;\"" (chr 13) (chr 10) " }" (chr 13) (chr 10) " elseif ($status -eq \'NoData\') {" (chr 13) (chr 10) " $line = \'*** GNSS ERROR: Without data ***\';;;;;;\"" (chr 13) (chr 10) " }" (chr 13) (chr 10) " elseif ($p.IsUnknown) {" (chr 13) (chr 10) " $line = \'*** ERROR GNSS: Unknown position ***\';;;;;;\"" (chr 13) (chr 10) " }" " else {" (chr 13) (chr 10) " $line = $p.Latitude + ';' + $p.Longitude + ';' + $p.Altitude + ';' + $p.HorizontalAccuracy + ';' + $p.VerticalAccuracy" (chr 13) (chr 10) " }" (chr 13) (chr 10) " try {" (chr 13) (chr 10) " Set-Content -Path $outFile -Value $line" (chr 13) (chr 10) " }" (chr 13) (chr 10) ;;; " catch {" ;;; (chr 13) ;;; (chr 10) ;;; " Write-Host 'ERROR escribiendo...: $($_.Exception.Message)'" ;;; (chr 13) ;;; (chr 10) ;;; " }" (chr 13) (chr 10) (strcat " Start-Sleep -Milliseconds " (if ur (itoa ur) "1000")) (chr 13) (chr 10) "}" ) cmd (strcat "powershell.exe -NoProfile -ExecutionPolicy Bypass -NoExit -Command \"" cad "\"" ) ) (vlax-invoke-method sh 'Run cmd 1 :vlax-false) (grtext -1 "*** GNSS writing file \'pos.txt\' ***") ) (alert "ERROR: \nUpdate rate should be 1000, 2000, 3000 or 5000\n\nExiting...") ) (vlax-release-object sh) ) ) )
    3 points
  2. 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.
    3 points
  3. The lat long convert is out there I have used one for here in AUS, the formula behind it is the same I think for any where in the world, but inside it is numerous values that depend on your location in the world, something like 8. values can be like 0.9987999 scale factor. So we need @PGia to tell us where she/he is in the world and what zones are relevant. Will do a quick look for the formula.
    2 points
  4. @masao_8 The Express tools must be installed with AutoCAD. If you mean just loading it, it's in my code above: (if acet-load-expresstools (acet-load-expresstools)) To make a grread loop work exactly like ssget. it's a huge ask. There is a ton of options to emulate. Could you explain EXACTLY what you want the function to do? What you're asking for has seemed to shift, or you weren't explaining it well enough. Below is an update to my code to add just the auto window and crossing selection: ;; Function to do a simple Select/Deselect using grread. ;; By PJK - 6/16/2026 ;; Updated 6/29/2026 to add window selection emulation (defun pjk-grread-Select (/ done en grl grc grv ss ss->elst sx wp1 wp2) (defun ss->elst (ss / i r) (if ss (repeat (setq i (sslength ss))(setq r (cons (ssname ss (setq i (1- i))) r))) ) ) (if acet-load-expresstools (acet-load-expresstools)) (setq ss (ssadd)) (princ "\nSelect to add objects or SHIFT+Select to remove from selection set: ") (while (not done) (setq grl (grread T 15 (if wp1 0 2)) grc (car grl) grv (cadr grl) ) (cond ((= grc 5) (redraw) (if wp1 (progn (grdraw wp1 (list (car grv) (cadr wp1) (caddr wp1)) -1 (if (< (car grv) (car wp1)) 1 0)) (grdraw wp1 (list (car wp1) (cadr grv) (caddr wp1)) -1 (if (< (car grv) (car wp1)) 1 0)) ) ) ) ((= grc 3) (if (acet-sys-shift-down) (if (setq en (car (nentselp grv))) (progn (if (ssmemb en ss)(ssdel en ss)) (redraw en 4) ) (if (not wp1) (progn (setq wp1 grv) (princ "\rSelect opp corner: ") ) (progn (redraw) (setq wp2 grv) (if (< (car wp2) (car wp1)) (mapcar '(lambda (a)(ssdel a ss)(redraw a 4)) (setq sx (ss->elst (ssget "C" wp1 wp2))) ) (mapcar '(lambda (a)(ssdel a ss)(redraw a 4)) (setq sx (ss->elst (ssget "W" wp1 wp2))) ) ) (princ (strcat "\n(" (itoa (length sx) ) ") Objects found and Removed from selection. " ) ) (setq wp1 nil wp2 nil) ) ) ) (if (setq en (car (nentselp grv))) (progn (ssadd en ss) (redraw en 3) ) (if (not wp1) (progn (setq wp1 grv) (princ "\rSelect opp corner: ") ) (progn (redraw) (setq wp2 grv) (if (< (car wp2) (car wp1)) (mapcar '(lambda (a)(ssadd a ss)(redraw a 3)) (setq sx (ss->elst (ssget "C" wp1 wp2))) ) (mapcar '(lambda (a)(ssadd a ss)(redraw a 3)) (setq sx (ss->elst (ssget "W" wp1 wp2))) ) ) (princ (strcat "\n(" (itoa (length sx)) ") Objects found and added to selection. " ) ) (setq wp1 nil wp2 nil) ) ) ) ) ) ((= grc 2) (setq done (if (vl-position kcode '(13 32)) T nil)) ) ((= grc 25)(setq done T)) ) ) (if (> (sslength ss) 0) (progn (foreach i (mapcar 'cadr (ssnamex ss))(redraw i 4)) ss ) nil ) )
    2 points
  5. 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.
    2 points
  6. I don't have AutoCAD 2027, but it may show up in AutoCAD 2026. I will do some checking when I get back to work next week. You should post your script and your shape linetypes that are an issue. You could see if a LISP works for you Lee Mac has one... https://lee-mac.com/loadlinetype.html. Here is an example of using loadlinetype.lsp in a Macro... You may want to contact Autodesk, they may know about the issue or at least would need to know.
    1 point
  7. Thanks, @BIGAL You're right: it's probably necessary to solve the problem of transforming latitude/longitude to UTM. I might review the code to publish a more complete version. Or maybe someone else will do it before me
    1 point
  8. import traceback from pyrx import Ap, Db, Ed, Ge def validate_layout(source_db: Db.Database, target_db: Db.Database, layout_name: str): """Validates if the layout exists in source and is safe to write to target.""" source_layout_dict = Db.Dictionary(source_db.layoutDictionaryId()) if not source_layout_dict.has(layout_name): print(f"Layout '{layout_name}' not found in source drawing.") return False target_layout_dict = Db.Dictionary(target_db.layoutDictionaryId()) if target_layout_dict.has(layout_name): print(f"Layout '{layout_name}' already exists in target drawing.") return False return True def clone_layout_from_db(source_db: Db.Database, target_db: Db.Database, layout_name: str): """Clones a specified layout from a source database to a target database layout dictionary.""" if not validate_layout(source_db, target_db, layout_name): return False try: source_layout_dict = Db.Dictionary(source_db.layoutDictionaryId()) source_layout_id = source_layout_dict.getAt(layout_name) id_map = Db.IdMapping() id_map.setDestDb(target_db) source_db.wblockCloneObjects( [source_layout_id], target_db.layoutDictionaryId(), id_map, Db.DuplicateRecordCloning.kDrcIgnore, ) return True except Exception as e: print(f"Error encountered during cloning: {e}") traceback.print_exc() return False @Ap.Command() def doit(): layout_name = "S7" source_path = r"E:\Batch\06457 RE Submittal.dwg" target_db = Db.curDb() try: source_db = Db.Database.createFromDWG(source_path) if clone_layout_from_db(source_db, target_db, layout_name): print(f"Successfully cloned layout '{layout_name}'.") manager = Ap.LayoutManager() manager.updateLayoutTabs() except Exception as err: print(f"Failed to load or process source drawing: {err}")
    1 point
  9. Given that you indicate pre 2000 it is maybe time to upgrade. There is alternatives to Acad like Bricscad, Intellicad, Gstar to mention a few and much cheaper.
    1 point
  10. Post the extracted data we can not help unless we have something we can touch. The correct way to approach this is to match the borehole label with its corresponding attribute data. I did this for a client and we are talking hundreds of objects like your boreholes, so have something maybe already done. The simplest way is make the tables from the data.
    1 point
  11. There is more people using Bricscad these days and designing roads, surfaces drainage and sewerage is much in demand. If Admin is happy this is a link to Civil Site Design demonstration running under Bricscad. Any one who has used CIV3D or some other CIvil software may be interested. Its features are well in advance of the current inbuilt Civil features in Bricscad. https://bricsys.registration.goldcast.io/events/6416ee0a-cbec-4869-a7fa-60922b0a5905?utm_campaign=45980519-APACWebinar-NextGenCSD-26Q3-APAC&utm_source=email&utm_medium=CADapps_email&utm_content=NextGenCSD_invite
    1 point
  12. I don't know if I understood exactly what the need was, but here is my proposal. Moving the cursor over entities adds to the selection if the mode is active (left-click) and pressing + or - toggles to add or remove. (defun C:AutoSel ( / oldpcka key_mod ss tmp key_sel e_sel) (setq oldpcka (getvar "PICKADD") key_mod 'ssadd) (setvar "PICKADD" 2) (or (setq ss (ssget "_I")) (setq ss (ssget "_P")) ) (if ss (sssetfirst nil ss) (setq ss (ssadd))) (princ "\n[+/-]: AutoSelect ADD/REMOVE [Left-Click]: AutoSelect ON/OFF [Right-Click]: Quit AutoSelect ") (princ "\nAutoSelect <<OFF>>") (while (or (= 5 (car (setq tmp (grread t 5 2)))) (= 3 (car tmp)) (member tmp '((2 43) (2 45)))) (cond ((= 2 (car tmp)) (cond ((eq (cadr tmp) 43) (setq key_mod 'ssadd) (princ "\nMode add select") ) ((eq (cadr tmp) 45) (setq key_mod 'ssdel) (princ "\nMode remove select") ) ) ) ((= 3 (car tmp)) (if (null key_sel) (progn (setq key_sel T) (princ "\nAutoSelect <<ON>>") ) (progn (setq key_sel nil) (princ "\nAutoSelect <<OFF>>") ) ) ) ((= 5 (car tmp)) (cond ((and key_sel (setq e_sel (nentselp (cadr tmp)))) (cond ((eq 'ENAME (type (car (last e_sel)))) ((eval key_mod) (car (last e_sel)) ss) ) ((eq "VERTEX" (cdr (assoc 0 (entget (car e_sel))))) ((eval key_mod) (cdr (assoc 330 (entget (car e_sel)))) ss) ) (T ((eval key_mod) (car e_sel) ss)) ) (sssetfirst nil ss) ) (T nil) ) ) (T (princ "\nAbnormal command shutdown ")) ) ) (setvar "PICKADD" oldpcka) (princ "\nEnd of command. ") (prin1) )
    1 point
  13. I have merged the 2 threads since they seem related.
    1 point
  14. 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.
    1 point
  15. 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 ?
    1 point
  16. 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.
    1 point
  17. 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
    1 point
  18. 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.
    1 point
  19. 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)
    1 point
  20. 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
    1 point
  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
    1 point
  22. https://www.lee-mac.com/steal.html (Steal "C:\\My Folder\\MyDrawing.dwg" '(("Layouts" ("Page1" "Page2"))))
    1 point
  23. 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.
    1 point
  24. 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!!!
    1 point
  25. @masao_8 Here is a solution for a simple single selection add and SHIFT-Select to remove. Perhaps this will give you a basis for starting: ;; Function to do a simple Select/Deselect using grread. ;; By PJK - 6/16/2026 (defun pjk-grread-Select (/ done en grl grc grv ss) (if acet-load-expresstools (acet-load-expresstools)) (setq ss (ssadd)) (princ "\nSelect to add objects or SHIFT+Select to remove from selection set: ") (while (not done) (setq grl (grread T 15 2) grc (car grl) grv (cadr grl) ) (cond ((= grc 3) (if (setq en (car (nentselp grv))) (if (acet-sys-shift-down) (progn (if (ssmemb en ss)(ssdel en ss)) (redraw en 4) ) (progn (ssadd en ss) (redraw en 3) ) ) ) ) ((= grc 2) (setq done (if (vl-position grv '(13 32)) T nil)) ) ((= grc 25)(setq done T)) ) ) (if (> (sslength ss) 0) (progn (foreach i (mapcar 'cadr (ssnamex ss))(redraw i 4)) ss ) nil ) )
    1 point
  26. Perhaps you could use the undocumented (acet-sys-shift-down) express tools function within the grread loop? Then you would have to manipulate highlighting with (redraw [3/4]) and use (ssadd) and (ssdel) to update the selection set.
    1 point
  27. Doesn't that depend on PICKADD value? I do believe the default is select to add and shift select to deselect from selection set. To that end, it needs to be clarified from OP what they need, my WAG is something being already done with grread and need to deselect. AFAIK (and that's very little, mostly from my previous thread ) The left click is doable with grread, but it would ignore the SHIFT (also CTRL, etc.), so probably would need something else to show the SHIFT key is pressed. Which reminds me I need to get back to work on that and the centerline on rivers, roads, etc. problem when I get regular work caught up.
    1 point
  28. Isn't that how CAD works already? you select something either by mouse clicke or window it will be highlighted hold shift to deselect it the same way. I know if you have to many things selected they are no longer highlighted.
    1 point
  29. I think you would need to test for 'shift' being pressed and the test for a left mouse entity selection. Do a 'princ' on your grread loop to display what you are doing, shift and select something - which should give you what you want to test for.
    1 point
  30. Yes but as I have had to do things working with the government or local municipalities isn't so cut and dry. just easier to do it the way they want it
    1 point
  31. Hi, everyone, My name is Lĩnh, from Vietnam. I've done the initial release of an app to unfold a Solid to paper layout. I am waiting the Autodesk App Store to publish it but these days the store takes very long to review anything. It is a free app. Purposes to create it are to master the polyline and 3d geometry programming technique in AutoCAD, and to promote my custom programming service. I will be very happy if someone like it, use it, or point out the direction for it progress futher. Currently I see I can use it to make some toy in paper for my son Also, I see I can make an web app out from it via Forge: you upload your drawing with the 3D model to the web then the web return the unfold layouts for you to process further. Anyway, currently, it is only available as a bundle to install to your local desktop PC. The 7cad 3D Unfold.bundle.zip download link is here: https://1drv.ms/u/s!ArVZkS2ji0h0yoIU9FPZCKVnXfOSUA?e=g6KjRa --------------------- To install, just unzip it to the C:\ProgramData\Autodesk\ApplicationPlugins folder. That is one of default locations for all addin for AutoCAD. 1st Command: 7cad_Unfold: It has 2 tabs. The General Tab is for general shape. The second tab is for revolve shape which the unfold layout should be arrange smarter. 2 other commands are 7cad_FoldUp and 7cad_CutOut. FoldUp is just a demonstration command, animate the Unfold-FoldUp routine to check if everything are fit as expect. CutOut command is to join pieces together, like union command in AutoCAD, so you have cutout polylines ready for print. Thank you, Lĩnh The General Unfold routine is like this:
    1 point
  32. Adding a few example macros from my Linetypes drop-down added to the Properties ribbon tab of my custom cuix file. As most of us use visual lisp it's easier to add (vl-load-com) to acaddoc.lsp than adding it to every lisp or macro. Keeping all my lin files in the same support folder as acad.lin makes accessing them easier. Loading lin files using Lee Mac's code: Reload Current ^C^C^P(or LM:LoadLinetypes (load "LoadLinetypesV1-3.lsp"))(LM:LoadLinetypes (list(getvar "celtype")) T) Reload All ^C^C^P(or LM:LoadLinetypes (load "LoadLinetypesV1-3.lsp"))(LtRedef) Dots ^C^C^P(or NewStyle (load "NewStyle.lsp"))(NewStyle "Arial" "arial.ttf") (or LM:LoadLinetypes (load "LoadLinetypesV1-3.lsp"))(LM:LoadLinetypes '("ArialDOT" "ArialDOT2" "ArialDOTX2" "PlusPlus") T) LT Curves ^C^C^P(or LM:LoadLinetypes (load "LoadLinetypesV1-3.lsp"))(LM:LoadLinetypes '("C25" "C-25" "C50" "C-50" "TREELINE_L" "TREELINE_R") T) LT Fences Walls ^C^C^P(or LM:LoadLinetypes (load "LoadLinetypesV1-3.lsp"))(LM:LoadLinetypes '("FENCELINE1" "FENCELINE2" "FENCE" "FENCE2" "FENCE5" "RD-Fence" "FENCE-BOX" "FENCE-BOX2" "FENCE-BOX4" "FENCE-BOX8" "FENCE-DIA" "FENCE-DIA2" "FENCE-DIA4" "FENCE-HW" "FENCE-H1" "FENCE-H2" "FENCE-O" "FENCE-X" "FENCE-Alan" "FENCE-X2" "FENCE-X4" "FENCE-O2" "BARBWIRE_1" "BARBWIRE_2" "CHAINLINK_1" "CHAINLINK_2" "STOCKADE_1" "STOCKADE_2" "STONEWALL") T) LT Dir Arrows ^C^C^P(or NewStyle (load "NewStyle.lsp"))(NewStyle "Arial" "arial.ttf") (or LM:LoadLinetypes (load "LoadLinetypesV1-3.lsp"))(LM:LoadLinetypes '("DIRECTION" "DIRECTION2" "DIRECTION5" "DIRECTION-A" "ArialARROW" "ArialAHead" "ArialTriangle") T) LT Danger ^C^C^P(or NewStyle (load "NewStyle.lsp"))(NewStyle "WINGDINGS" "wingding.ttf") (or LM:LoadLinetypes (load "LoadLinetypesV1-3.lsp"))(LM:LoadLinetypes '("Danger") T) Creating linetypes with text with ronjonp's lisp at https://www.theswamp.org/index.php?topic=47058.msg520876#msg520876 Everyone should have this, Thanks ronjonp! ^C^C^P(or C:makelt (load "makelt.lsp"));makelt Editing lin files: Edit Acad.lin ^C^C_start;acad.lin; Edit Arial.lin ^C^C_start;Arial.lin; Edit BOUCLES.lin ^C^C_start;BOUCLES.lin; List all Shape Names from all loaded Shape files using ShapeNames.lsp by lido. Handy if you only have the shx file not the shp. ^C^C^P(if(not ShapeNames)(load "ShapeNames.lsp"))(ShapeNames);; Code I added to bottom of Lee's LoadLinetypesV1-3.lsp for reloading all linetypes: ;Reload All Loaded Linetypes (defun LtRedef ( / acadObj doc ltlay) (setq acadObj (vlax-get-acad-object) doc (vla-get-ActiveDocument acadObj) ) (vlax-for obj (vla-get-linetypes doc) (if (not (wcmatch (vla-get-name obj) "*|*,Continuous,ByBlock,ByLayer")) (setq ltlay (cons (vla-get-name obj) ltlay)) ) ) (LM:loadlinetypes ltlay T) (vla-Regen doc acActiveViewport) ) Required lin, shx, shp and lsp files attached, adding Arial, wingdings and wingdings3 text styles are done with attached NewStyle.lsp wingdings.lin wingdings3.lin Arial.lin boucles.lin acad.lin boucles.shp boucles.shx NewStyle.lsp
    1 point
×
×
  • Create New...