Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/14/2021 in all areas

  1. It's really old now and probably needs to be updated:
    2 points
  2. I believe entity types which predate R13 did not require or make use of the group 100 subclass markers, therefore (and per the documentation), for backwards compatibility, AutoCAD will ignore DXF group 100 for the following entities: As such, entity types which do not feature in the above list will require the appropriate DXF group 100 subclass markers to be present in the DXF data supplied to the entmake/entmakex functions - it is also worth noting that since the entmake/entmakex functions are capable of generating non-graphical entities (e.g. Layers, Dictionaries etc.) both subclass markers are required because not all entities will derive from the AcDbEntity class.
    1 point
  3. Wiiiide and wiide nice setup.
    1 point
  4. I got this from somewhere and often refer to it, originally by Lee-Mac 2010 ; Entmake examples by Lee-mac 2010 (defun 3DFace (p1 p2 p3 p4) (entmakex (list (cons 0 "3DFACE") (cons 10 p1) (cons 11 p2) (cons 12 p3) (cons 13 p4)))) (defun Arc (cen rad sAng eAng) (entmakex (list (cons 0 "ARC") (cons 10 cen) (cons 40 rad) (cons 50 sAng) (cons 51 eAng)))) (defun AttDef (tag prmpt def pt hgt flag) (entmakex (list (cons 0 "ATTDEF") (cons 10 pt) (cons 40 hgt) (cons 1 def) (cons 3 prmpt) (cons 2 tag) (cons 70 flag)))) (defun Circle (cen rad) (entmakex (list (cons 0 "CIRCLE") (cons 10 cen) (cons 40 rad)))) (defun Ellipse (cen maj ratio) (entmakex (list (cons 0 "ELLIPSE") (cons 100 "AcDbEntity") (cons 100 "AcDbEllipse") (cons 10 cen) (cons 11 maj) (cons 40 ratio) (cons 41 0) (cons 42 (* 2 pi))))) (defun Insert (pt Nme) (entmakex (list (cons 0 "INSERT") (cons 2 Nme) (cons 10 pt)))) (defun Line (p1 p2) (entmakex (list (cons 0 "LINE") (cons 10 p1) (cons 11 p2)))) (defun LWPoly (lst cls) (entmakex (append (list (cons 0 "LWPOLYLINE") (cons 100 "AcDbEntity") (cons 100 "AcDbPolyline") (cons 90 (length lst)) (cons 70 cls)) (mapcar (function (lambda (p) (cons 10 p))) lst)))) (defun M-Text (pt str) (entmakex (list (cons 0 "MTEXT") (cons 100 "AcDbEntity") (cons 100 "AcDbMText") (cons 10 pt) (cons 1 str)))) (defun Point (pt) (entmakex (list (cons 0 "POINT") (cons 10 pt)))) (defun Polyline (lst) (entmakex (list (cons 0 "POLYLINE") (cons 10 '(0 0 0)))) (mapcar (function (lambda (p) (entmake (list (cons 0 "VERTEX") (cons 10 p))))) lst) (entmakex (list (cons 0 "SEQEND")))) (defun Solid (p1 p2 p3 p4) (entmakex (list (cons 0 "SOLID") (cons 10 p1) (cons 11 p2) (cons 12 p3) (cons 13 p4)))) (defun Text (pt hgt str) (entmakex (list (cons 0 "TEXT") (cons 10 pt) (cons 40 hgt) (cons 1 str)))) (defun Trce (p1 p2 p3 p4) (entmakex (list (cons 0 "TRACE") (cons 10 p1) (cons 11 p2) (cons 12 p3) (cons 13 p4)))) (defun xLine (pt vec) (entmakex (list (cons 0 "XLINE") (cons 100 "AcDbEntity") (cons 100 "AcDbXline") (cons 10 pt) (cons 11 vec)))) (defun Layer (Nme) (entmake (list (cons 0 "LAYER") (cons 100 "AcDbSymbolTableRecord") (cons 100 "AcDbLayerTableRecord") (cons 2 Nme) (cons 70 0)))) (defun Layer (Nme Col Ltyp LWgt Plt) (entmake (list (cons 0 "LAYER") (cons 100 "AcDbSymbolTableRecord") (cons 100 "AcDbLayerTableRecord") (cons 2 Nme) (cons 70 0) (cons 62 Col) (cons 6 Ltyp) (cons 290 Plt) (cons 370 LWgt))))
    1 point
  5. What's this "2" monitor set up you speak of? Dell U3818DW and Samsung P2770HD
    1 point
  6. @Grrr Give this a try: (defun c:test (/ d cvp vp enx ll ur) (cond ((and (setq vp (car (entsel "\nPick viewport: "))) (setq enx (entget vp))) ;; Force model space before setting cvport (vlax-put (setq d (vla-get-activedocument (vlax-get-acad-object))) 'mspace 1) (setvar 'cvport (cdr (assoc 69 enx))) (vla-getboundingbox (vlax-ename->vla-object (car (entsel "\nPick Object"))) 'll 'ur) (vla-zoomwindow (vlax-get-acad-object) ll ur) (vlax-put d 'mspace 0) ) ;; (setvar 'cvport cvp) ) ; if ) ; defun
    1 point
  7. @Trudy read the instructions in the lsp file header. see the new attachment here. I've added an option to set the offset distance, but I cant set a default value... see if you can help... Contour_Label.lsp
    1 point
  8. Here is a very simplistic Visual LISP program: (defun c:layname ( ) (vlax-for layer (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))) (if (wcmatch (strcase (vla-get-name layer)) "*SUBNAME*") (vl-catch-all-apply 'vla-put-name (list layer "NEWLAYER-SUBNAME")) ) ) (princ) ) (vl-load-com) (princ) Note that since the replacement name is static, the program will only rename the first layer matching the given pattern, else duplicate layer names will arise (hence the need for the clumsy vl-catch-all-apply expression).
    1 point
×
×
  • Create New...