Jump to content

Leaderboard

Popular Content

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

  1. @Sambo FWIW ;; This (setq allents (ssget "_P" (list (cons -4 "<AND") (cons -4 "<OR") (cons 0 "TEXT") (cons 0 "MTEXT") (cons -4 "OR>") (cons -4 "<OR") (cons 8 "TEXT_STAGE NUMBER_LISP") (cons 8 "TEXT_LOT NUMBER_LISP") (cons 8 "POLY*") (cons -4 "OR>") (cons -4 "AND>") ) ) ) ;; Could be simplified to this (setq allents (ssget "_P" '((0 . "TEXT,MTEXT") (8 . "TEXT_STAGE NUMBER_LISP,TEXT_LOT NUMBER_LISP,POLY*")) ) )
    1 point
  2. Perhaps! (setq ordertable (list "*STONE-*" "*EARTH-*" "*PIPES-*" ) ) (setq enlay "TEST-STONE-NEW") (setq enlaydouble "DEFAULT-PIPES-NEW") (if (< (car (vl-remove nil (mapcar '(lambda (x) (if (wcmatch enlay x) (vl-position x ordertable))) ordertable))) (car (vl-remove nil (mapcar '(lambda (x) (if (wcmatch enlaydouble x) (vl-position x ordertable))) ordertable))) ) (print "(entdel enseldouble)") (print "(entdel ensel)") )(prin1)
    1 point
  3. I agree. You need to learn the interface, menu's, navigation, how to set up units and snapping, keyboard shortcuts (because everything in Blender is accessed by keyboard commands), modifiers, etc. Blender is a fantastic program, but it does have a learning curve. Starting with the absolute basics is very important.
    1 point
  4. You may have to loop through the selection set using a if with ands. Not tested very much (setq ALLENTS (ssadd)) (repeat (setq x (sslength ss1)) (setq ent (ssname ss1 (setq x (1- x)))) (setq entgt (entget ent)) (setq str (cdr (assoc 0 entgt))) (setq lay (cdr (assoc 8 entgt))) (if (and (or (= str "TEXT")(= str "MTEXT")) (or (= lay "TEXT_STAGE NUMBER_LISP")(= lay "TEXT_LOT NUMBER_LISP")(wcmatch "POLY" "*POLY*")) ) (setq allents (ssadd ent allents)) ) )
    1 point
  5. If I understood your request correctly, maybe this! (defun c:yst (/ *error* vl ov p l_p ss pt1 pt2) (defun *error* (msg) (if ov (mapcar 'setvar vl ov)) (if (not (wcmatch (strcase msg) "*CANCEL*,*EXIT*")) (princ (strcat "\n<< Error: " msg " >>"))) (princ)) (setq vl '("CMDECHO" "OSMODE") ov (mapcar 'getvar vl)) (mapcar 'setvar vl '(0 255)) (initget 1) (setq l_p (list (setq p (getpoint "\nGive first point of crossing: ")))) (while (setq p (getpoint p "\nNext point: ")) (setq l_p (cons p l_p)) (grdraw (cadr l_p) (car l_p) -1 1) ) (if (setq ss (ssget "_CP" l_p)) (if (and (setq pt1 (getpoint "\nSelect Base Point: ")) (setq pt2 (getpoint pt1 "\nSelect Second Point: "))) (progn (setvar "OSMODE" 0) (command "_.stretch" ss "" pt1 ".y" pt2 0))) (princ "\n<< Nothing Selected >>")) (mapcar 'setvar vl ov) (princ))
    1 point
  6. Just a couple of comments, when you select the white line for offset which end is start ? So the end lines may get drawn on the wrong end. I use a check distance from end points to pick point and then can see whether to join start or ends of new offset. I use this for -ve (- of) note space between - and of. An example of check end. once you know start or end then offset matches. (defun doline ( / d1 d2) (setq pt1 (vlax-get Obj 'StartPoint)) (setq pt2 (vlax-get Obj 'EndPoint)) (setq d1 (distance pt1 pt3) d2 (distance pt2 pt3) ) (if (< d1 d2) (progn (setq temp pt1) (setq pt1 pt2) (setq pt2 temp) ) ) (princ) ) (setq ent (entsel "\npick p/line near end ")) (setq pt3 (cadr ent)) (setq obj (vlax-ename->vla-object (car ent))) (doline )
    1 point
  7. @pkenewellThank You for the code really appreciate that. I am exactly looking for something like this. I wanted to have the layers (TEXT,DIMENSIONS,TITLE,TITLE BLOCK) on in my drawing and rest of the layers off. I wanted to do that by typing a command and not by selecting the objects with the mouse.
    1 point
  8. Technically, the rotation of the block is associated with the block itself and not the Dynamic Property called Angle. We assume that every block is inserted at 0-degree rotation initially and then the dynamic property called Angle manipulated the orientation of the block itself with regards to its initial rotation or current rotation. It is not recommended to have duplicate properties, one inherent to the block and another as a dynamic block property. It's not helpful. The Rotation is group code 50 of the entity itself while the dyn prop can be recovered using Lee-Mac's dynpropvalue functions in AutoLISP. You don't usually constrain the local inherent rotation (Angle) of the block to that of the WCS.
    1 point
  9. Nice work @Sambo I Working on something should have it posted tonight.
    1 point
×
×
  • Create New...