Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/30/2024 in all areas

  1. "Don't get me started on non-CAD people calling the shots on CAD. It's a dark place!" Where I worked they wanted our cad dwg's to be controlled by the document control system, think Word, excel, powerpoint etc. Just said to the manager you tell us how to make it work, they still run Acad out side then save final dwg into document control.
    2 points
  2. I have this at Home.... ;;; list object properties ;;; ;;; By SLW210 (Steve Wilson) ;;; ;;; Works for a lot of objects ;;; ;;; https://www.cadtutor.net/forum/topic/90639-text-fuzzy-on-multileaders/?do=findComment&comment=650190 (defun c:LOP () (c:listobjectproperties)) (defun c:listobjectproperties () (vl-load-com) (setq ss (ssget)) ; Prompt user to select objects (if ss (progn (setq n (sslength ss)) ; Get the number of selected objects (princ (strcat "\nNumber of objects selected: " (itoa n))) (repeat n (setq ent (ssname ss (setq i (if (not i) 0 (1+ i))))) ; Get the next selected object (setq obj (vlax-ename->vla-object ent)) ; Convert to VLA object (setq objName (vla-get-ObjectName obj)) ; Get object type ;; Print properties (princ (strcat "\n\nProperties of " objName ":")) (princ (strcat "\nHandle: " (vla-get-Handle obj))) (princ (strcat "\nColor: " (itoa (vla-get-Color obj)))) (princ (strcat "\nLayer: " (vla-get-Layer obj))) (princ (strcat "\nLinetype: " (vla-get-Linetype obj))) ;; Additional properties based on object type (cond ;; MText ((equal objName "AcDbMText") (princ (strcat "\nText: " (vla-get-TextString obj)))) ;; Line ((equal objName "AcDbLine") (princ (strcat "\nStart Point: " (vl-princ-to-string (vlax-get obj 'StartPoint)))) (princ (strcat "\nEnd Point: " (vl-princ-to-string (vlax-get obj 'EndPoint))))) ;; Arc ((equal objName "AcDbArc") (princ (strcat "\nCenter Point: " (vl-princ-to-string (vlax-get obj 'Center)))) (princ (strcat "\nRadius: " (rtos (vlax-get obj 'Radius) 2 4))) (princ (strcat "\nStart Angle: " (rtos (vlax-get obj 'StartAngle) 2 4))) (princ (strcat "\nEnd Angle: " (rtos (vlax-get obj 'EndAngle) 2 4)))) ) ) (princ) ) (princ "\nNo objects selected.") ) (princ) )
    1 point
  3. In VBA ObjectARX https://help.autodesk.com/view/OARX/2022/ENU/?guid=OARX-ManagedRefGuide-Autodesk_AutoCAD_DatabaseServices_MLeader_Normal https://help.autodesk.com/view/OARX/2022/ENU/?guid=OARX-ManagedRefGuide-__MEMBERTYPE_Methods_Autodesk_AutoCAD_DatabaseServices_MLeader https://help.autodesk.com/view/OARX/2022/ENU/?guid=OARX-ManagedRefGuide-Autodesk_AutoCAD_DatabaseServices_MLeader_MText https://help.autodesk.com/view/OARX/2022/ENU/?guid=OARX-ManagedRefGuide-__MEMBERTYPE_Properties_Autodesk_AutoCAD_DatabaseServices_MLeader You should read this too...https://atlight.github.io/formats/dxf-leader.html I am at home and no way to check multileaders, but, give this a try
    1 point
  4. @Steven P is that not extrim command or Cookie cutter.lsp
    1 point
  5. Do you mean cap ends ? That was a big hint. Google "cap line ends Autocad lisp" I thought had something but can not find it.
    1 point
  6. I think you're talking about test function c:t1 , as stated in my post above use c:t2 well, I'm off, wedding anniversary ... already donated one of my ribs to buy roses for the wife , now I have to feed her too... there goes another of my ribs , probably two
    1 point
  7. Try this code. (defun c:Test (/ s doc) (princ "\nPick on single block to explode blocks within") (if (setq s (ssget "_+.:S:L:E" '((0 . "INSERT")))) (progn (vlax-for obj (vla-item (vla-get-blocks (setq doc (vla-get-activedocument (vlax-get-acad-object) ) ) ) (vla-get-effectivename (vlax-ename->vla-object (ssname s 0)) ) ) (if (and (= "AcDbBlockReference" (vla-get-objectname obj)) (null (vl-catch-all-error-p (vl-catch-all-apply 'vla-explode (list obj)) ) ) ) (vl-catch-all-apply 'vla-delete (list obj)) ) ) ) ) (command "_.-purge" "_B" "*" "_N") (vla-regen doc acallviewports) (princ) )(vl-load-com)
    1 point
  8. about auto dimension :http://www.cadtutor.net/forum/showthread.php?85984-lisp-automatic-dimensioning/#6 I collated some code , about auto dimension. I don't understand programming. now ,Share to everyone. Thank you for all the people helped me. autoDim01.lsp autoDim02.lsp autoDim03.lsp autoDim04.lsp autoDim05.lsp autoDim06.lsp autoDim06-b.lsp autoDim07.lsp autoDim08.lsp autoDim09.lsp autoDim10.lsp autoDim11.lsp
    1 point
  9. Continue to add. AutoDim.lsp AutoDim.dcl DH.lsp
    1 point
  10. Try something like this: (defun c:exnest ( ) (vlax-for blk (vla-get-blocks (LM:acdoc)) (if (and (= :vlax-false (vla-get-isxref blk)) (= :vlax-false (vla-get-islayout blk)) ) (vlax-for obj blk (if (and (= "AcDbBlockReference" (vla-get-objectname obj)) (null (vl-catch-all-error-p (vl-catch-all-apply 'vla-explode (list obj)))) ) (vl-catch-all-apply 'vla-delete (list obj)) ) ) ) ) (command "_.-purge" "_B" "*" "_N") (vla-regen (LM:acdoc) acallviewports) (princ) ) ;; Active Document - Lee Mac ;; Returns the VLA Active Document Object (defun LM:acdoc nil (eval (list 'defun 'LM:acdoc 'nil (vla-get-activedocument (vlax-get-acad-object)))) (LM:acdoc) )
    1 point
×
×
  • Create New...