Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/18/2021 in all areas

  1. I'm quite new to all the vla functions myself, so it took me a while to figure out how to use the list above. But this works. Here is how to get the object: (setq obj (vlax-ename->vla-object (car (entsel)))) And this to get the alignment of that object: (vla-get-attachmentPoint obj) And this to set the alignment of that object: (vla-put-attachmentPoint obj 1) Not sure how to add error handling and to check if the AttachmentPoint property actually exists in the object.
    1 point
  2. Can use numbers a bit easier to type 1-9 AttachmentPoint = 5 middle centre.
    1 point
  3. It's the "AttachmentPoint" property... It's value is one of the following: acTopLeft acTopCenter acTopRight acMiddleLeft acMiddleCenter acMiddleRight acBottomLeft acBottomCenter acBottomRight
    1 point
  4. Did you specifically choose a metric based drawing template file such as acadiso.dwt? The default is imperial base and is named acad.dwt.
    1 point
  5. Please check this modified code: (defun c:sa( / Name drawingNew1 drawingNew2 ) (vl-load-com) (setq Name (getvar "DWGNAME")) (setq drawingNew1 (strcat (getvar "DWGPREFIX") (vl-filename-base Name) "-XREF" (vl-filename-extension Name))) (setq drawingNew2 (strcat (getvar "DWGPREFIX") (vl-filename-base Name) "-pl" (vl-filename-extension Name))) ;test if target drawing already exists (if (not (findfile drawingNew1)) (command "_SAVEAS" "" drawingNew1) (command "_SAVEAS" "" drawingNew1 "_Y") ) (if (not (findfile drawingNew2)) (command "_SAVEAS" "" drawingNew2) (command "_SAVEAS" "" drawingNew2 "_Y") ) (command "_XREF" "_A" drawingNew1 '(0.0 0.0 0.0) 1.0 1.0 0.0) (command "_RENAME" "_B" (vl-filename-base drawingNew1) "ARCH") (princ) )
    1 point
×
×
  • Create New...