Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/21/2024 in all areas

  1. I could modify my Layer Director application to achieve this - feel free to drop me a message through my site if you want to go this route.
    2 points
  2. Simply whith: (without initget) (setq pt1 (getpoint "\nPoint <0.0 0.0 0.0>?: ")) (if( null pt1) (setq pt1 '(0.0 0.0 0.0)))
    1 point
  3. Maybe an image, better for slide or vector. IIRC, Lee Mac has something either in a forum or on his website. Getting Started with Dcl Dialogs (autolisp-exchange.com) AutoLISP Code (autolisp-exchange.com) The AutoLisp Ultimate Tutorial - Dialog Control Language - DCL (jefferypsanders.com) AutoCAD 2023 Developer and ObjectARX Ayuda | About Creating Images (DCL) how to vector the image in dcl - AutoLISP, Visual LISP & DCL - AutoCAD Forums (cadtutor.net) Vector Image Creation for DCL - AutoLISP, Visual LISP & DCL - AutoCAD Forums (cadtutor.net) DCL Image Tiles (augi.com)
    1 point
  4. 1 point
  5. Please use Code Tags in the future when posting code. (use the <> in the editor toolbar)
    1 point
  6. Oh okay, now I get it. Thats what I was trying to do! Thanks!
    1 point
  7. Ok the blocks have some serious issues making just auto labeling very hard, each block is individual and the line work for each is no where near the insert point. So if you just want to see try this, I set textsize to 150. This is very rough. ; LXY and TAUPUR. (defun wow ( / ) (while (setq ent (entsel "\npick a block Enter to exit ")) (setq obj (vlax-ename->vla-object (car ent))) (setq atts (vlax-invoke obj 'Getattributes)) (foreach att atts (if (= (vlax-get att 'Tagstring) "LXY") (setq str1 (vlax-get att 'Textstring) ) ) (if (= (vlax-get att 'Tagstring) "TAUPUR") (princ (setq str2 (vlax-get att 'Textstring))) ) ) (setq str (strcat str1 "\n" str2)) (setq pt (cdr ent)) (command "-mtext" pt pt str "") ) (princ) ) (wow)
    1 point
  8. Perhaps this tutorial is helpful - https://lee-mac.com/promptwithdefault.html
    1 point
  9. No worries. Glad it worked. While you're at it, try this one, to remove all those annoying vertices. It's quite satisfying to see it RXV.lsp
    1 point
  10. You are almost correct. In your rectification above, the global variable will be set to nil if the user presses Enter without giving a distance. The purpose of the cond function is to justify the default value that was previously stored. In my code snippet, the cond function will put in whatever value the user inputs (if the user actually does input something in). Otherwise, getdist then returns nil, and the cond function proceeds into the second line and inserts the default variable. In your snippet, you managed to get your message prompt right. However, remember that, just because the prompt simply alerts the user the default value using <> doesn't mean that getdist acually returns that value. You still need to use if conditions to account for this.
    1 point
  11. and for completion, this uses VLA- functions, you were half way there earlier - no attsync required (defun c:MoveBlocks ( / target-point block-name) (setq target-point '(300.0 5.25 0.0)) ;;Point to move to (setq block-name "RegionserviceUTR") ;;Block Name to move (MoveBlock target-point block-name) ) (defun MoveBlock (target-point block-name / BlockSS acount) (setq BlockSS (ssget "_X" (list '(0 . "INSERT")(cons 2 block-name)))) (setq acount 0) (while (< acount (sslength BlockSS)) (setq Pt1 (vlax-3d-point (cdr (assoc 10 (entget (ssname BlockSS acount) )))) ) (setq Pt2 (vlax-3d-point target-point) ) (vla-move (vlax-ename->vla-object (ssname BlockSS acount)) Pt1 Pt2) (setq acount (+ acount 1)) ) ; end while (princ) )
    1 point
  12. If I picked DB_inre terrass first, then Innerslänt_terrass, then I got it show - if I picked them the other way around, they didn't show. Weird... I'll put up a file in a second. Filen: http://sprend.com/download.htm?C=752d403de88f472fb6573d94521a5b2c
    1 point
  13. Hello all, as a result of this good discussion, finally I have written right codes. If the lisp/fas/vlx program is loaded by APPLOAD command, the desired folder can be found this way: (defun MT-Get-Last-Appload-Folder (/ acad CurVer1 CurVer2 CurProf RegPath folder) (setq acad "HKEY_CURRENT_USER\\software\\Autodesk\\AutoCAD\\") (setq CurVer1 (strcat (vl-registry-read acad "CurVer") "\\")) (setq CurVer2 (vl-registry-read (strcat acad "\\" CurVer1) "CurVer")) (setq acad (strcat acad CurVer1 CurVer2)) (setq CurProf (vl-registry-read (strcat acad "\\Profiles") "")) (setq RegPath (strcat acad "\\Profiles\\" CurProf "\\Dialogs\\Appload")) (setq folder (vl-registry-read RegPath "MainDialog")) ) But perhaps the program is loaded directly by issuing (load "program-name"), so in this condition the method mentioned by JohnM works: (defun MT-Get-Loaded-Files (ext / data-count val-names-list val-data files) (if (null ext) (setq ext "*") ) (setq data-count (vl-registry-read (strcat "HKEY_CURRENT_USER\\software\\Microsoft\\windows\\currentversion\\explorer\\comdlg32\\opensavemRU\\" ext ) "MRULIST" ) ) (setq val-names-list (vl-string->list data-count)) (foreach n val-names-list (if (setq val-data (vl-registry-read (strcat "HKEY_CURRENT_USER\\software\\Microsoft\\windows\\currentversion\\explorer\\comdlg32\\opensavemRU\\" ext ) (chr n) ) ) (setq files (cons val-data files)) ) ) files )
    1 point
  14. did you sent me a link or what ?
    0 points
×
×
  • Create New...