Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/05/2019 in all areas

  1. I would recommend picking up an aftermarket AutoCAD 3D book. Another option would be to take a class. It could be a 3 or 4 day class taught at an Authorized AutoCAD reseller or an 8 to 12 week course taught at a local community college.
    1 point
  2. Good points from Cad64, as always. Do look at AutoDesk Fusion 360. It is free for hobbyists and startups. https://www.autodesk.com/campaigns/fusion-360-for-hobbyists
    1 point
  3. This is one particular task where the individual ActiveX properties accessible through Visual LISP are a huge advantage... Consider the following toggle implemented in Visual LISP: (defun c:txtin-visual ( / i o s ) (if (setq s (ssget "_:L" '((0 . "*DIMENSION")))) (repeat (setq i (sslength s)) (setq i (1- i) o (vlax-ename->vla-object (ssname s i)) ) (vlax-put o 'textinside (~ (vlax-get o 'textinside))) ) ) (princ) ) (vl-load-com) (princ) Compared with the corresponding Vanilla AutoLISP solution: (defun c:txtin-vanilla ( / a b e i s x ) (if (setq s (ssget "_:L" '((0 . "*DIMENSION")))) (progn (regapp "ACAD") (repeat (setq i (sslength s)) (setq i (1- i) e (ssname s i) ) (cond ( (not (and (setq x (cdadr (assoc -3 (entget e '("ACAD"))))) (setq a (cdr (member '(1000 . "DSTYLE") x))) ) ) (setq x (append x '( (1000 . "DSTYLE") (1002 . "{") (1070 . 174) (1070 . 001) (1002 . "}") ) ) ) ) ( (not (setq b (cdr (member '(1070 . 174) a)))) (setq x (append (reverse (member '(1000 . "DSTYLE") (reverse x))) '( (1002 . "{") (1070 . 174) (1070 . 001) ) (cdr a) ) ) ) ( (setq x (append (reverse (member '(1000 . "DSTYLE") (reverse x))) (reverse (member '(1070 . 174) (reverse a))) (cons (cons 1070 (- 1 (cdr (assoc 1070 b)))) (cdr b)) ) ) ) ) (entmod (append (entget e) (list (list -3 (cons "ACAD" x))))) ) ) ) (princ) )
    1 point
  4. Assuming I've understood correctly, you could use my Length & Area Field program with the predetermined attribute tag argument. Download the program from the link provided. Open the program file in Windows Notepad or similar plain text editor. Copy the following to a new line at the start or end of the file: (defun c:cl ( ) (lengthfield "CUTTING_LENGTH" "%lu6")) Save the program file. Open AutoCAD. Load the program file using APPLOAD or other loading method. Run the custom command you have just defined using the syntax CL at the command-line.
    1 point
  5. (attribute definition) cutting_length is inside a block, right? Is dimension line "dim A" part of the block? maybe a dynamic block? If the dimension is just a loose dimension, try this (command DTA, for dim to attribute): ;; Set Attribute Value - Lee Mac ;; Sets the value of the first attribute with the given tag found within the block, if present. ;; blk - [ent] Block (Insert) Entity Name ;; tag - [str] Attribute TagString ;; val - [str] Attribute Value ;; Returns: [str] Attribute value if successful, else nil. (defun LM:setattributevalue ( blk tag val / enx ) (if (and (setq blk (entnext blk)) (= "ATTRIB" (cdr (assoc 0 (setq enx (entget blk)))))) (if (= (strcase tag) (strcase (cdr (assoc 2 enx)))) (if (entmod (subst (cons 1 val) (assoc 1 (reverse enx)) enx)) (progn (entupd blk) val ) ) (LM:setattributevalue blk tag val) ) ) ) (defun c:dta ( / dim blk lng) (setq dim (entsel "\nSelect the dim")) (setq blk (entsel "\nSelect the block")) (setq lng (cdr (assoc 42 (entget (car dim))))) (LM:setattributevalue (car blk) "cutting_length" (rtos lng 2 3)) ;; that 3 is the precision. Feel free to change it (princ) ) attachment: the circle is a block called "B" with an attribute "cutting_length" dta.dwg
    1 point
  6. Thanks rkmcswain, I ended up using Notepad++ to strip the colour tags, as suggested in that post you linked. Find and replace the following, using REGEX mode, for anyone interested: \[.+?\]
    1 point
  7. there is around 60 layers( if u opened a file ) and i need them to slowly shoving up and turning off so they look like animation .. i ask if someone could do begging of script - i could do the rest .. this is what i came up so far .. but that don't work ..,
    1 point
  8. Hi all , i attach one lisp which is similar to ASMI first routine(#7) I wish that the final result from ASMI routine (#20) can be same as the result using lisp that i attach.which means the scale can be set and i can use a lisp to highlight or edit the integer(because not in Tag form). I try to mix up two routine but come out error:oops: V1.DWG V2.DWG V3.DWG V4.DWG ECC.LSP
    1 point
×
×
  • Create New...