Jump to content

Search the Community

Showing results for tags 'solved'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Categories

  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 9 results

  1. Is it possible show grips on a spline when used (entsel), highlight them when cursor is over and be able "snap" to them? Thank you.
  2. If we have lengths of each side of a triangle ( L1, L2, L3 ), we can draw 2 circles at a distance of L1 from each other, with radius of L2 and L3 respectively. Center of each circle would give us P1 and P2 coordinates and intersection of these circles would be the P3 point. How would we get P3 coordinates without drawing anything in autolisp if P1 and P2 are already known? (Looking for a most performance efficient way) Thank you. TLDR; Working code in this reply.
  3. Hello. When using FILLET command in AutoCAD 2023 I get this: But when I add this as toolbar button with: ^C^C_fillet _m It gives this: Ok, so it's different menu when command executed via (command) WTF! Then, I've tried this instead: ^C^C_fillet _u It works, until Radius is selected, once radius number submitted it interrupts the command. I hate to write entire routine just for this basic functionality, so maybe I'm doing something wrong here?
  4. Is there a way track/detect user selected point when native commands are used? What I mean by this is during point selection (let's say when creating a circle) if user changed osnap configuration and snapped to something, is there a way detect coordinates of that point? ggread could provide cursor coordinates, but since osnap was temporary changed it might not provide proper selected coordinates... As an excise example having 2 lines like this: draw a 3point circle, using horizontal line for first 2 points and for 3rd point change osnap to end point and click vertical line just above the horizontal line, so the bottom end of vertical line is selected. The final circle will be flipped 180 from the preview. The ggread would show coordinates above the horizontal line, but actual 3rd point will be below. So, is there a way detect all 3 points after the circle was drawn? test.dwg
  5. In Autocad 2008 rulesurf would create mesh using AcDbPolygonMesh: in Autocad 2023 rulesurf creates visually the same surface but with totally different structure: Is there a way in AC2023 create the same type of AcDbPolygonMesh surface?
  6. Hello. I'm experiencing a strange situation with break command. I want to cut a line at a specific place using "nearest" snap. I use the following commands: This works perfectly, a line splits into two at the selected point. However, when I attempt use of (command "break" pause "f" pause "@") it removes chunk of the line...what am I doing wrong? P.S. This worked fine in AutoCAD 2002 [EDIT] By adding nea before submitting second point seems to fix the issue. But I still would like to know why there are different results when commands entered manually vs using (command) function Command: break Select object: Specify second break point or [First point]: f Specify first break point: _nea to Specify second break point: @ Command: (command "break" pause "f" pause "nea" "@") break Select object: Specify second break point or [First point]: f Specify first break point: _nea to Specify second break point: nea to @
  7. I'm new to Autolisp please forgive me for my bad coding. I'm trying to find the coverage area by copying and moving the closed polyline (in "_ResiFSI" layer) but due to some unknown reason I couldn't move the object precisely to the destination that I have picked using "getpoint". There is reference block named "Direction Ref Point" in each floor plan (floor plan is drafted in "_Floor" layer) and when I try to copy each closed polyline in "_ResiFSI" with based point as reference blocks location and destination point from user input. Please help me. Note: I have also tried to regenerate the views and also used zoom extent. Please find the drawing in attachment. (defun c:ca() (setq ctr1 0 chk 0) (setq fpt (getpoint)) (command "ZOOM" "E") (setq sset1 (ssget "x" '((0 . "LWPOLYLINE")(8 . "_Floor")) )) (repeat (sslength sset1) (setq ctr 0) (SETQ PEN (ssname sset1 ctr1)) (SETQ PENL (ENTGET PEN)) (SETQ PPL (LIST)) (FOREACH N PENL (PROGN (SETQ PPA (CAR N)) (SETQ PPV (CDR N)) (IF (= PPA 10) (SETQ PPL (APPEND PPL (LIST PPV)))) ));END N (setq sset (ssget "WP" PPL )) (command "ZOOM" "E") (repeat (sslength sset) (setq item (ssname sset ctr)) (setq item (vlax-ename->vla-object item)) (setq layrname (vla-get-layer item)) (setq tst (cdr (assoc 0 (entget (ssname sset ctr)))) ) (if (= tst "LWPOLYLINE") (cond ((= layrname "_ResiFSI") (setq copyitem (ssname sset ctr)) (setq chk 1) ));cond );if (cond ((= layrname "_Floor") (cond ( (= tst "INSERT") (setq blockname (cdr (assoc 2 (entget (ssname sset ctr))))) )) ) ) (cond ((= "Direction Ref Point" blockname) (setq bpt (cdr (assoc 10 (entget (ssname sset ctr))))) )) (setq ctr (1+ ctr)) );repeat for block (if (= chk 1) (PK:mycopy copyitem bpt fpt)) (setq chk 0) (setq ctr1 (+ ctr1 1)) );repeat for floor );defun (defun PK:mycopy(obj pt1 pt2) (setq thisdrawing (vla-get-activedocument (vlax-get-acad-object))) (vla-Regen thisdrawing acActiveViewport) (vla-move (vla-copy (vlax-ename->vla-object obj) );copy (vlax-3d-point pt1) (vlax-3d-point pt2) );move ) 140.dwg
  8. Hello, i have a problem that i hope you guys can help me. As attach i have a lsp file, some things on that code i made myself some others took from the web, because i'm not that savvy with autocad lisp. Basically what this lsp do is, measure all elements in an dwg and makes a xls file with the Layer; linetype, color and length for all lines, polylines and arcs. All work well, but i need one simple thing that i can't manage to understand the way to do it, i need to divide this lisp in to different commands like "medzm" and "medzmm". In "medzm" i need that the result equal as is is now, in the "medzmm" i need that the length is divided by 1000. Thanks for is advance for any help you can give. MedZ v3.lsp
  9. Hello Experts, I have been used a lisp to add Mleader object to text and Mtext. And i have found this lisp from this forum. This lisp will be added the Mleader wit text and Mtext, but it's changed the text height and style after adding Mleader as per Mleader style which we set. Instead of default style, i want to keep the text height and style as it is. For ex. If the text height is 3 and it is bold..after adding the Mleader it's changed the height as 2 and plain style. But i want it should keep with same height and style. Could you please anyone suggest me how to do this. This code i have used. ;; original code by VVA (defun make_mleader_style (mleaderstylename textcolor leadercolor / adoc mldrdict newldrstyle objcolor ) (vl-load-com) (setq adoc (vla-get-activedocument (vlax-get-acad-object))) (setq mldrdict (vla-item (vla-get-dictionaries adoc) "ACAD_MLEADERSTYLE") ) ;_ end of setq (setq newldrstyle (vlax-invoke mldrdict 'addobject mleaderstylename "AcDbMLeaderStyle" ) ;_ end of vlax-invoke ) ;_ end of setq (setq objcolor (vla-getinterfaceobject (vlax-get-acad-object) (strcat "AutoCAD.AcCmColor." (substr (getvar "acadver") 1 2) ) ;_ end of strcat ) ;_ end of vla-getinterfaceobject ) ;_ end of setq (vla-put-colorindex objcolor textcolor) (vla-put-textcolor newldrstyle objcolor) (vla-put-colorindex objcolor leadercolor) (vla-put-leaderlinecolor newldrstyle objcolor) (foreach item (list '("AlignSpace" 4) (list "ArrowSize" (fix (/ (vla-get-arrowsize (vla-item mldrdict "Mleader Triangle")) 1.5 ) ;_ end of / ) ;_ end of fix ) ;_ end of list '("BitFlags" 0) '("BlockConnectionType" 1) '("BlockRotation" 0.0) '("BlockScale" 1.0) '("BreakSize" 0.125) '("ContentType" 2) ;mtext '("Description" "My Style Description") '("DoglegLength" 1.25) '("DrawLeaderOrderType" 0) '("DrawMLeaderOrderType" 1) '("EnableBlockRotation" -1) '("EnableBlockScale" -1) '("EnableDogleg" -1) '("EnableFrameText" 0) '("EnableLanding" -1) '("FirstSegmentAngleConstraint" 0) (list "LandingGap" (vla-get-landinggap (vla-item mldrdict "Standard")) ) ;_ end of list '("LandingGap" 1) '("LeaderLineType" 1) '("LeaderLineTypeId" "ByLayer") '("LeaderLineTypeId" "ByLayer") '("LeaderLineWeight" 60) '("MaxLeaderSegmentsPoints" 2) '("ScaleFactor" 1.0) '("SecondSegmentAngleConstraint" 0) '("TextAlignmentType" 0) '("TextAngleType" 1) '("TextHeight" 2) '("TextLeftAttachmentType" 1) ;original 3 '("TextRightAttachmentType" 1);original 3 '("TextString" "Default\\PText") '("TextStyle" "STANDARD") ) ;_ end of list (vlax-put newldrstyle (car item) (cadr item)) ) ;_ end of foreach newldrstyle ) ;_ end of defun ;; Test (defun c:admld (/ *error* ms) (vl-load-com) (while (defun *error* (msg) (command "_undo" "_e") (if (and msg (not (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")) ) ;_ end of and (princ (strcat "\nError: " msg)) ) ;_ end of if (princ) ) ;_ end of defun (command "_undo" "_be") (if (vl-catch-all-error-p (vl-catch-all-apply '(lambda () (setq ms (make_mleader_style "My style" 256 256));change "My style" and colors to suit ) ;_ end of lambda ) ;_ end of vl-catch-all-apply ) ;_ end of vl-catch-all-error-p (alert "Problem creating Mleader Style") (setvar "CMLEADERSTYLE" "My style");change "My style" to suit ) ;_ end of if (if (vl-catch-all-error-p (vl-catch-all-apply '(lambda () (vla-put-arrowsymbol ms "_Origin2"));; existing arrow block in the drawing ) ;_ end of vl-catch-all-apply ) ;_ end of vl-catch-all-error-p (not (vl-catch-all-error-p (vl-catch-all-apply '(lambda () (vla-put-arrowsymbol ms acarrowdefault)) ) ;_ end of vl-catch-all-apply ) ;_ end of vl-catch-all-error-p ) ;_ end of not ) ;_ end of if (princ) (vl-load-com) (cond ;;Select the text/mtext objects ((or (null (setq ss1 (ssget ":S" '((0 . "text,mtext"))))) (= 0 (setq ssl (sslength ss1))) ) nil ;nothing selected ) (T (setq Textobj (vlax-ename->vla-object (ssname ss1 0)) ActSpace (if (= 0 (getvar "cvport")) (vla-get-paperspace (vla-get-activedocument (vlax-get-acad-object)) ) (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)) ) ) StartPt (getpoint "\nPick location for point of arrow head: ") txt (vla-get-TextString Textobj) TextPt (vla-get-insertionpoint textobj) TextPt (vlax-variant-value TextPt) TextPt (vlax-safearray->list TextPt) ptlist (vlax-make-safearray vlax-vbdouble '(0 . 5) ) ptlist (vlax-safearray-fill ptlist (append StartPt TextPt)) MLObj (vla-addmleader ActSpace ptlist 'LeaderIndex ) ) (vla-put-textstring mlobj txt) (vla-delete Textobj) ) ) ) ) ;_ end of defun Thanks in advance.
×
×
  • Create New...