Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/04/2024 in all areas

  1. Pretty much can do it manually in AutoCAD, or modify in Notepad as your text editor. If you do a list, bullet or which ever option, you should be able to start the entries, delete the A, bullet, number, then type A1, hit TAB, then it should word wrap to the tab stop, hit enter and then type the A2, hit TAB, so on and so forth. For Notepad, just create the LIST, BULLET, etc. in the internal editor, then use MTEXTED and change "internal" to "Notepad" then open the text and replace the A (or whatever) with A1, etc. You might be able to do it all in Word as the text editor as BIGAL shows and it remain. Doing all of this from memory, a search of the internet might bring up some better instructions and/or methods. I guess Autodesk thinks you can just use Word, etc. if you need to do this. I actually always do my lists manually as shown in my first method, never liked AutoCAD's.
    1 point
  2. Just copy the line to the command line you should get a number returned that is the object color. I dont have LT so can not check what works I am trying to find out if "getpropertyvalue" works. It makes getting properties much easier.
    1 point
  3. Not sure if this is supported in LT 2024 can you test please. Should return the color. Just copy to command line. (getpropertyvalue (car (entsel "\nPick an object ")) "Color")
    1 point
  4. Hopefully this is what you want. (defun c:test ( / lst obj atts att file ofile) (setq file (getfiled "Output File" "" "csv" 1)) (setq ofile (open file "w")) (setq ss (ssget '((0 . "INSERT")))) (repeat (setq x (sslength ss)) (setq obj (vlax-ename->vla-object (ssname ss (setq x (- x 1))))) (setq atts (vlax-invoke obj 'Getattributes)) (foreach att atts (if (= (vlax-get att 'tagstring) "CELL_4F3") (write-line (vlax-get att 'textstring) ofile) ) ) ) (close ofile) (princ) ) (c:test)
    1 point
  5. Using Word got close you can define a bullet Ax, took a couple of goes to get right. See the A1 A2 A3 at bottom. Use Define new number format. Us Aussies need to stick together up near Newcastle.
    1 point
  6. Or this ? minimally tested (defun c:foo ( / ent dxf_ent l_prop lay_name) (while (not (setq ent (entsel "\nSelect an object: "))) (princ "\nMissing...") ) (setq dxf_ent (entget (car ent))) (setq l_prop (mapcar '(lambda (x) (if (assoc x dxf_ent) (cdr (assoc x dxf_ent)) (cdr (assoc x (entget (tblobjname "LAYER" (cdr (assoc 8 dxf_ent)))))) ) ) '(6 62 370) ) ) (while (wcmatch (setq lay_name (getstring "\nEnter layer name: " T)) "*[`?`,```*\\\"<>/=|:]*") (princ "\nIncorrect layer name, try again") ) (if (not (tblsearch "LAYER" lay_name)) (entmake (list '(0 . "LAYER") '(100 . "AcDbSymbolTableRecord") '(100 . "AcDbLayerTableRecord") (cons 2 lay_name) '(70 . 0) (cons 62 (cadr l_prop)) (cons 370 (caddr l_prop)) (cons 6 (car l_prop)) ) ) (mapcar '(lambda (x y) (entmod (subst (cons x y) (assoc x (entget (tblobjname "LAYER" lay_name))) (entget (tblobjname "LAYER"lay_name)) ) ) ) '(70 6 62 370) (cons 0 l_prop) ) ) (setvar "CLAYER" lay_name) (prin1) )
    1 point
  7. This one might work better with LT (defun c:laym ( / ) ;;Select Entities ; (setq MyEnt (entget (car (entsel "\nPick a object ")))) ; pick object (setq MyEnt (entget (entlast))) ; use last object ;;Extract information (setq col (cdr (assoc 62 MyEnt))) (setq lin (cdr (assoc 6 MyEnt))) (setq linw (cdr (assoc 370 MyEnt))) (setq lay (entget (tblobjname "layer" (cdr (assoc 8 MyEnt)))) ) ;;Set information to layer details if 'by layer' or 'by block' (if (= col nil)(setq col (cdr (assoc 62 lay))) ) (if (= lin nil)(setq lin (cdr (assoc 6 lay))) ) (if (= linw nil)(setq linw (cdr (assoc 370 lay))) ) (if (= linw nil)(setq linw -3)) ;;lineweight to default (setq str (getstring "\nEnter new layer name " T)) (setq LayerFree 0) ;;Freeze new layer if 1 (setq LayerPlot 1) ;;layer plots if 1 ;;Create Layer (setq NewLayer (entmakex (list '(0 . "LAYER") (cons 100 "AcDbSymbolTableRecord") (cons 100 "AcDbLayerTableRecord") (cons 2 str) ; Layer Name (if (= LayerFree 1) (cons 70 1) (cons 70 0)) ; Freeze (if (= col nil)() (cons 62 col)) ; colour. -ve for layer off (if (= Lin nil)(cons 6 "Continuous") (cons 6 Lin)) ; Line type (if (= LayerPlot 1) (cons 290 1) (cons 290 0)) ; Plot (if (= Linw nil) () (cons 370 Linw)) ; line weight ))); end list ; end entmake ; end setq ;;Set entity to new layer (setq MyEnt (subst (cons 8 str) (assoc 8 MyEnt) MyEnt )) ;;Add in here if you want other entity properties to 'by layer' etc (entmod MyEnt) (princ) )
    1 point
  8. You should correct your information to inform everyone that you are using AutoCAD 2024 LT.
    1 point
  9. This? (vl-load-com) (defun add_vtx (obj add_pt ent_name / bulg) (vla-addVertex obj (1+ (fix add_pt)) (vlax-make-variant (vlax-safearray-fill (vlax-make-safearray vlax-vbdouble (cons 0 1)) (list (car (trans (vlax-curve-getpointatparam obj add_pt) 0 ent_name)) (cadr (trans (vlax-curve-getpointatparam obj add_pt) 0 ent_name)) ) ) ) ) (setq bulg (vla-GetBulge obj (fix add_pt))) (vla-SetBulge obj (fix add_pt) (/ (sin (/ (* 4 (atan bulg) (- add_pt (fix add_pt))) 4)) (cos (/ (* 4 (atan bulg) (- add_pt (fix add_pt))) 4)) ) ) (vla-SetBulge obj (1+ (fix add_pt)) (/ (sin (/ (* 4 (atan bulg) (- (1+ (fix add_pt)) add_pt)) 4)) (cos (/ (* 4 (atan bulg) (- (1+ (fix add_pt)) add_pt)) 4)) ) ) (vla-update obj) ) (defun c:div-vertex_po ( / ss max_l n ent obj_vla pr dist_end dist_start seg_len div l_div l) (princ "\nSelect polylines.") (while (null (setq ss (ssget '((0 . "LWPOLYLINE"))))) (princ "\nSelect is empty, or isn't POLYLINE!") ) (initget 7) (setq max_l (getdist "\nMax length between vertex: ")) (repeat (setq n (sslength ss)) (setq ent (ssname ss (setq n (1- n))) obj_vla (vlax-ename->vla-object ent) pr (fix (vlax-curve-getEndParam ent)) ) (repeat (fix (vlax-curve-getEndParam ent)) (setq dist_end (vlax-curve-GetDistAtParam ent pr) dist_start (vlax-curve-GetDistAtParam ent (setq pr (1- pr))) seg_len (- dist_end dist_start) div (1+ (fix (/ seg_len max_l))) l_div (/ seg_len div) l l_div ) (while (< l seg_len) (add_vtx obj_vla (vlax-curve-getparamatdist ent (- dist_end l)) ent) (setq l (+ l l_div)) ) ) ) (prin1) )
    1 point
  10. My Version of the BURST LISP - aptly named. [i][color=#990099];; MacBurst ~ An Alternative Burst LISP by Lee Mac[/color][/i] [i][color=#990099];; Copyright (c) 03.06.2009[/color][/i] [b][color=RED]([/color][/b][b][color=BLUE]defun[/color][/b] c:MacBurst [b][color=RED]([/color][/b][b][color=BLUE]/[/color][/b] ss iPt lst[b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]vl-load-com[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]princ[/color][/b] [b][color=#ff00ff]"\nInitializing..."[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]if[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]setq[/color][/b] ss [b][color=RED]([/color][/b][b][color=BLUE]ssget[/color][/b] [b][color=DARKRED]'[/color][/b][b][color=RED]([/color][/b][b][color=RED]([/color][/b][b][color=#009900]0[/color][/b] . [b][color=#ff00ff]"INSERT"[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]foreach[/color][/b] Blk [b][color=RED]([/color][/b][b][color=BLUE]vl-remove-if[/color][/b] [b][color=DARKRED]'[/color][/b][b][color=BLUE]listp[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]mapcar[/color][/b] [b][color=DARKRED]'[/color][/b][b][color=BLUE]cadr[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]ssnamex[/color][/b] ss[b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]setq[/color][/b] iPt [b][color=RED]([/color][/b][b][color=BLUE]vlax-3D-point[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]cdr[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]assoc[/color][/b] [b][color=#009900]10[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]entget[/color][/b] Blk[b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]mapcar[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]function[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]lambda[/color][/b] [b][color=RED]([/color][/b]x[b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]vla-move[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]vlax-ename->vla-object[/color][/b] x[b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]vlax-3D-point[/color][/b] [b][color=DARKRED]'[/color][/b][b][color=RED]([/color][/b][b][color=#009900]0[/color][/b] [b][color=#009900]0[/color][/b] [b][color=#009900]0[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] iPt[b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]append[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]mapcar[/color][/b] [b][color=DARKRED]'[/color][/b][b][color=BLUE]entmakex[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]vl-remove-if[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]function[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]lambda[/color][/b] [b][color=RED]([/color][/b]x[b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]eq[/color][/b] [b][color=#ff00ff]"ATTDEF"[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]cdr[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]assoc[/color][/b] [b][color=#009900]0[/color][/b] x[b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]setq[/color][/b] lst [b][color=RED]([/color][/b][b][color=BLUE]mapcar[/color][/b] [b][color=DARKRED]'[/color][/b][b][color=BLUE]entget[/color][/b] [b][color=RED]([/color][/b]GetObj [b][color=RED]([/color][/b][b][color=BLUE]tblobjname[/color][/b] [b][color=#ff00ff]"BLOCK"[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]cdr[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]assoc[/color][/b] [b][color=#009900]2[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]entget[/color][/b] Blk[b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]mapcar[/color][/b] [b][color=DARKRED]'[/color][/b][b][color=BLUE]entmakex[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]mapcar[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]function[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]lambda[/color][/b] [b][color=RED]([/color][/b]y[b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]vl-remove-if[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]function[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]lambda[/color][/b] [b][color=RED]([/color][/b]x[b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]member[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]car[/color][/b] x[b][color=RED])[/color][/b] [b][color=DARKRED]'[/color][/b][b][color=RED]([/color][/b][b][color=#009900]100[/color][/b] [b][color=#009900]3[/color][/b] [b][color=#009900]2[/color][/b] [b][color=#009900]70[/color][/b] [b][color=#009900]280[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] y[b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]mapcar[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]function[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]lambda[/color][/b] [b][color=RED]([/color][/b]x[b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]subst[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]cons[/color][/b] [b][color=#009900]0[/color][/b] [b][color=#ff00ff]"TEXT"[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]assoc[/color][/b] [b][color=#009900]0[/color][/b] x[b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]subst[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]cons[/color][/b] [b][color=#009900]73[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]cdr[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]assoc[/color][/b] [b][color=#009900]74[/color][/b] x[b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]assoc[/color][/b] [b][color=#009900]74[/color][/b] x[b][color=RED])[/color][/b] x[b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]vl-remove-if-not[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]function[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]lambda[/color][/b] [b][color=RED]([/color][/b]x[b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]eq[/color][/b] [b][color=#ff00ff]"ATTDEF"[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]cdr[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]assoc[/color][/b] [b][color=#009900]0[/color][/b] x[b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] lst[b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]entdel[/color][/b] Blk[b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]princ[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [i][color=#990099]; Get Block Sub-Entities[/color][/i] [b][color=RED]([/color][/b][b][color=BLUE]defun[/color][/b] GetObj [b][color=RED]([/color][/b]bObj[b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]if[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]setq[/color][/b] bObj [b][color=RED]([/color][/b][b][color=BLUE]entnext[/color][/b] bObj[b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]cons[/color][/b] bObj [b][color=RED]([/color][/b]GetObj bObj[b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b]
    1 point
×
×
  • Create New...