Jump to content

Leaderboard

  1. pkenewell

    pkenewell

    Community Member


    • Points

      3

    • Posts

      787


  2. mhupp

    mhupp

    Trusted Member


    • Points

      3

    • Posts

      2,192


  3. BIGAL

    BIGAL

    Trusted Member


    • Points

      2

    • Posts

      20,051


  4. Nikon

    Nikon

    Community Member


    • Points

      1

    • Posts

      677


Popular Content

Showing content with the highest reputation on 04/08/2026 in all areas

  1. @mhupp Correct it's no longer supported, but the "VLIDE" command and environment still works, at least as of my AutoCAD 2026.
    2 points
  2. https://www.zwsoft.com/support/zwcad-base-faq/517
    1 point
  3. Suggestions received, posted and updated. As with the coords, the point is a reference entity. Thanks (defun c:4x (/ *error* pt1 pt2 ss ) (princ (strcat "\n 45"(chr 186)"/135"(chr 186)" 3D.XLines <!pp>")) ;; ai: https://www.google.com/search?q=saving+2+lines+selection%2C+autolisp&client=firefox-b-1-e&hs=AnK&sca_esv=3c4c5acec5573df9&biw=1198&bih=593&ei=JazVaZ2GN-3fp84P46_CyAM&ved=0ahUKEwjdrJWQit2TAxXt78kDHeOXEDkQ4dUDCBE&oq=saving+2+lines+selection%2C+autolisp&gs_lp=Egxnd3Mtd2l6LXNlcnAiInNhdmluZyAyIGxpbmVzIHNlbGVjdGlvbiwgYXV0b2xpc3AyBRAAGO8FMgUQABjvBTIFEAAY7wUyCBAAGKIEGIkFSKOCAVDmIlj5PHABeACQAQCYAakBoAHdCKoBAzEuN7gBDMgBAPgBAZgCCaACqAvCAg4QABiABBiwAxiGAxiKBcICCBAAGLADGO8FwgILEAAYsAMYogQYiQXCAgoQIRigARjDBBgKwgIIECEYoAEYwwSYAwCIBgGQBgqSBwUxLjYuMqAHwSSyBwUwLjYuMrgHzwrCBwczLTYuMi4xyAfBAYAIAA&sclient=gws-wiz-serp (vl-load-com) (defun *error* ( msg ) (setvar 'cmdecho 0) (vla-endundomark (vla-get-activedocument (vlax-get-acad-object))) (if msg (prompt (strcat "\n" msg))) (setvar 'cursorsize 100) ;; reset to my prefer (setvar 'cmdecho 1) (princ) ) (vla-startundomark (vla-get-activedocument (vlax-get-acad-object))) ;; (setvar 'cursorsize 1) (entmakex ;; <LM '( (000 . "LAYER") (100 . "AcDbSymbolTableRecord") (100 . "AcDbLayerTableRecord") (002 . "XLINE") ;; Layer Name (070 . 0) ;; Layer Status (bit-coded) (006 . "Continuous") ;; Layer Linetype (must be loaded) (062 . 252) ;; Layer Colour (1-255) (290 . 0) ;; Non-Plot Flag (0=Plot, 1=NoPlot) (370 . -3) ;; Layer Lineweight (-3=Default) ) ) (defun zPoint ( / exv) ;; 3d point at xline _mid (not on 'xline layer) (setq pt1 (trans pt1 1 0)) (setq exv (trans (list 0 0 1) 1 0 T)) (entmakex (list (cons 0 "POINT") (cons 10 pt1) (cons 210 exv))) ) (defun cdd () (princ "\n") (princ (setq pp ;; make/prints coords & paste usable (strcat (rtos (car pt1) 2 4) "," ;; 'p' -- vertex from \/ getpoint (rtos (cadr pt1) 2 4) "," (rtos (caddr pt1) 2 4) ) ) ) (princ " cucs ");; (setenv "pp" pp) ;; crash saved coords in reg ) ;;// ----------------------------------------------------------------------------------------------------------- ;; Get the initial placement point ;; (while (setq pt1 (getpoint "\nSpecify Point for XLines: ")) (setvar 'cmdecho 0) (progn ;; Create a new 'usable' empty selection set (setq ss (ssadd)) ;; Initialize an empty set: ;; Create horizontal xline and add to selection set (command "_.xline" "_a" 45 pt1 "") (command "_.chprop" "_L" "" "_la" "XLINE" "") ;; make xline grey (ssadd (entlast) ss) ;; adds 'xline to empty 'ss selection set ;; Create vertical xline and add to selection set (command "_.xline" "_a" 135 pt1 "") (command "_.chprop" "_L" "" "_la" "XLINE" "") ;; make xline grey (ssadd (entlast) ss) ;; adds another 'xline to 'ss selection set (cdd) ;; post coords of 'pick.point (zPoint) ;; point at 'pick.point ) (setvar 'cursorsize 100) ;; reset to my prefer (setvar 'cmdecho 1) ) ;; end of while (vla-endundomark (vla-get-activedocument (vlax-get-acad-object))) (*error* nil) (princ) )
    1 point
  4. Ah looking it up you have to set the following https://help.autodesk.com/view/ACDLT/2026/ENU/?guid=GUID-1853092D-6E6D-4A06-8956-AD2C3DF203A3 (setvar 'LISPSYS 0)
    1 point
  5. @ScottMC I don't see any functional problems with it, other than as Nikon said, you should use the "_." before commands, even though they are not strictly necessary. FYI - The "." (dot) ensures the actual AutoCAD command is used, in case it has been redefined, and the "_" (underscore) allows the command and any options within it to be used in any localized language version of AutoCAD. Example in your routine: (command "_.chprop" "_L" "" "_la" "XLINE" "") Additionally: 1) You should also reset your "cursorsize" variable at the end of the routine: (setvar 'cursorsize 100) 2) You are resetting an undo mark in your error routine, and you never included a starting undo mark, i.e. (vla-startundomark (vla-get-activedocument (vlax-get-acad-object))) at the beginning of the routine. 3) Your routine or file should have (vl-load-com) if you use the Visual LISP ActiveX functions in #2 above. 4) You don't need a (progn ...) statement within a (while) loop. (Added) That being said. I cannot properly test the purpose of the "zpoint" function without knowing in what context you are using it, i.e. a sample drawing situation to test with? Otherwise I don't really understand your purpose for it.
    1 point
  6. I probably you need to add (_) before "off" (Command "_.-Layer" "_off" lay "") ??? I don't have the "_FREEZE" command in Autocad 2021. (Unknown "_FREEZE" command). But there is a command "_.LAYFRZ". To test the command, type "_FREEZE" on the command line.
    1 point
  7. You cant freeze\off only the points its either the whole layer or nothing. this makes a selection set and process it to find what layers they are on and turns feezes and turns off those layers. if their are other things on that layer they will also be frozen and off. (defun c:test01 ( / ss lay laylst) (vl-load-com) (setq doc (vla-get-ActiveDocument (vlax-get-acad-object))) (setq layers (vla-get-Layers doc)) (if (setq ss (ssget "_X" '((0 . "AECC_COGO_POINT") (8 . "*-PT")))) (foreach ent (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) (setq lay (cdr (assoc 8 (entget ent)))) (if (not (member lay laylst)) (setq laylst (cons lay laylst)) ) ) (foreach lay laylst (setq layerObj (vla-Item layers lay)) (vla-put-Freeze layerObj :vlax-true) (vla-put-Off layerObj :vlax-true) ) (prompt "\nNo matching COGO points found.") ) (princ) )
    1 point
  8. @mhupp did you look at my comment about the labels being at incorrect distance ? At the start they are correct and further along seem to have been shifted. A lot appear to have same incorrect offset. @pmadhwal7 I just made the blocks 1 unit long, just used BEDIT scale by 0,1 "0,0" then scale will be correct also turned off osnap. General comment given the chainage of the first label, 250414 the start of the pline is 250305, in label terms. Why is this start point not like 250300 which would make a lot more sense. Have used other pick label to set start chainage when testing. @pmadhwal7 need to know how are these labels being generated to a dwg.
    1 point
  9. Ok just ran all 488 values and there may be a problem in your sample dwg the Chainage labels are not at correct chainage compared to the start point. I looked and the block did not align properly so checked the distance from start point for a random label and the blocks inserted are at the chainage but your label is not. The blue line is a circle with the radius set to the correct chainage you can see goes through middle of block but label does not match. So here is some code, note the blocks have been made 1 unit in length. I also changed the Excel to work out the mid point yes can be done with lisp but really why not use Excel. The dwg attached shows the problem. The Excel I used is attached. Yes part two needs to be done but need some answers to what I see as lots of problems in future dwg's. Drawing1-test.dwg test.lsp Book1.xlsx
    1 point
  10. Not sure for ZWCAD, but it Tamil font installed on your computer, you should be able to access it if it is
    1 point
×
×
  • Create New...