Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/23/2023 in all areas

  1. I think I've got there Each cond statement worked individually, but as soon as I had 2, one after the other I was back to the same problem. So had a coffee & small light bulb moment, keep them independant, and make passing the first test call the second test.... While in may not be compact it works: (defun CHECK_SELECTIONS_FE () (cond ((/= fred3 NIL) (setq john fred3) (CHECK_SELECTIONS_F) ) ((/= ftg NIL) (setq john ftg) (CHECK_SELECTIONS_F) ) ) ) ;end CHECK_SELECTIONS_FE ; (defun CHECK_SELECTIONS_F () (cond ;Cond statement ((/= fred4 NIL) (CHECK_SELECTIONS_FSC) (princ fred4) ) (t (alert "OOPS! *new dialog* SELECT A FITTING SCHEDULE - TRY AGAIN!")) );end of cond ) ;end CHECK_SELECTIONS_F ; (defun CHECK_SELECTIONS_FSC () (cond ;Cond statement ((/= size NIL) (done_dialog) (princ size) ) (t (alert "OOPS! *new dialog* SELECT A FITTING SIZE - TRY AGAIN!")) );end of cond ) ;end CHECK_SELECTIONS_FSC I can now tidy up a little, replace FRED and his clones 2, 3, 4 etc Thanks for your help
    1 point
  2. The ahmktable is my code so that part is easy to comment about. (setq numcolumns 5) change 5 to 7. (vla-settext objtable 1 0 "NO") (vla-settext objtable 1 1 "LINETYPE") (vla-settext objtable 1 2 "LAYER COLOR") (vla-settext objtable 1 3 "LAYER NAME") (vla-settext objtable 1 4 "LENGTH") (vla-settext objtable 1 5 "HEIGHT") (vla-settext objtable 1 6 "AREA") (vla-Setcolumnwidth Objtable 0 50) (vla-Setcolumnwidth Objtable 1 400) (vla-Setcolumnwidth Objtable 2 400) (vla-Setcolumnwidth Objtable 3 400) (vla-Setcolumnwidth Objtable 4 100) (vla-Setcolumnwidth Objtable 5 100) (vla-Setcolumnwidth Objtable 6 150) You need to look for linetype in cell (setq col laycol) ; layer color 1-254 RGB done similar VLA-set-rgb (setq acm (vla-getinterfaceobject (vlax-get-acad-object) (strcat "autocad.accmcolor." (substr (getvar 'acadver) 1 2)))) (vla-put-colorindex acm laycol) (vla-setcellbackgroundcolor obj 2 2 acm) ; obj row col acm NOT TESTED.
    1 point
  3. rlx "street lights on our site are all interconnected by electric cables" There is a lisp that joins blocks as you suggest in sequence, its for electrical connections, Have you seen it, if not its at Forums/Autodesk. Let me know. I think I did something. I just posted this elsewhere draws offset lines along say a property boundary, I think its version 1 I am sure end result like ver 3 was a pline. Pretty easy to add pick blocks as 2nd step. offset sides pline.lsp
    1 point
  4. FWIW ;; This (and (/= fred4 nil) (/= size nil)) ;; Is the same as this (and fred4 size)
    1 point
  5. you mean like this??? (defun c:t1 ( / c i )(vl-load-com)(setq c (vlax-ename->vla-object (ssname (ssget "x" '((0 . "CIRCLE"))) 0)) i (vla-get-Center c))(mapcar '(lambda (p / o)(setq o (vla-copy c))(vla-move o i (vlax-3D-point p))) (mapcar 'vlax-curve-getstartpoint (mapcar 'cadr (ssnamex (ssget "x" '((0 . "LWPOLYLINE")))))))
    1 point
  6. I was certainly inspired by the posting of some Herringbone definitions in that Forum. I could not see the Herringbone lisp in your link, but feel sure that someone has written one. However, I was minded to find out the relationship between the numbers in the herringbone hatch pattern, and thought that by posting some more examples, other people would be able to figure out for themselves the logic (or post a request for help). It is quite beyond me to make a lisp, but I could try and explain my thoughts for others to make a lisp.
    1 point
×
×
  • Create New...