Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/28/2022 in all areas

  1. And an even better source http://www.lee-mac.com/ssget.html
    3 points
  2. Just replace this: (eq "Yes" (getkword "\nConvert to LWPolyline? [Yes/No] <No>: ")) With this: (null (getkword "\nConvert to LWPolyline? [Yes/No] <Yes>: ")) When a user hits enter then the return will be nil otherwise user will be forced to press No to not to convert to LWpolyline.
    1 point
  3. Thank you. This should give you the Path only. (vla-put-textstring (vlax-ename->vla-object pck) "%<\\AcVar Filename \\f \"%tc4%fn1\">%")
    1 point
  4. (initget 0 "Yes No") ; Limit the values you will receive with getkword below. Only yes and no are possible. (and (eq "Yes" (getkword "\nConvert to LWPolyline? [Yes/No] <No>: ")) ; When the value input by getkword is "Yes", ; the following is executed. Otherwise it won't run. ; The sentence between " " after getkword is just a message to the user, ; so changing it doesn't make any sense. ; Since it is written as <No>, it is written as if the default value is No, ; but it just does not work if it is not Yes. (setq ss (ssadd)) ; make empty selection set "ss" (foreach x (append lst lst2) (setq ss (ssadd (car x) ss))) ; add all of lst lst2 to ss (if (zerop (getvar 'peditaccept)) ; if pedit conversion alert is on (vl-cmdf "_.pedit" "_m" ss "" "_y" "_j" "" "") ; press "_y(=yes)" in routine (vl-cmdf "_.pedit" "_m" ss "" "_j" "" "") ; if off, without "_y" ) ;_ if ) ;_ and like this?
    1 point
  5. I love the LAYISO command, I use it all the time. I have set the alias for it to "LI", and "LU" for LAYUNISO. For those that still use Toolbars, there are a number of great tools available on the LAYERS 2 Toolbar, which crank up one's productivity. Another one on that toolbar which I really like is LAYWALK.
    1 point
  6. Change this: (rtos z 2 2) to this: (rtos z 2 3)
    1 point
  7. This should help you although some of your request is not understandable :
    1 point
  8. Hmsilva didn't post a complete lips code just examples for Bill to use. dbroada posted vba code that i think you need to install a VBA add-in to use inside AutoCAD. What are you looking to do? --edit this might be what your looking for https://adndevblog.typepad.com/autocad/2012/08/lisp-example-for-setting-and-getting-drawing-properties.html
    1 point
  9. Try this: (defun c:foo (/ doc pck lck get) ;;--------------------------------------------;; ;; Tharwat - Date: 13.Sep.2017 ;; ;; Drawing name to field without extension ;; ;;--------------------------------------------;; (and (setq pck (car (nentsel "\nPick Text/Mtext/Attribute :"))) (or (wcmatch (cdr (assoc 0 (entget pck))) "TEXT,MTEXT,ATTRIB") (alert "Invalid object <!>") ) (progn (setq doc (vla-get-activedocument (vlax-get-acad-object))) (if (eq 4 (logand 4 (cdr (assoc 70 (setq get (entget (tblobjname "LAYER" (cdr (assoc 8 (entget pck))) ) ) ) ) ) ) ) (entmod (subst '(70 . 0) (setq lck (assoc 70 get)) get)) ) (vla-put-textstring (vlax-ename->vla-object pck) "%<\\AcVar Filename \\f \"%fn2\">%" ) (if lck (entmod (subst lck (assoc 70 get) get))) (vla-regen doc acactiveviewport) ) ) (princ) ) (vl-load-com)
    1 point
×
×
  • Create New...