
(setq ss_1 (LM:ssget "\nSelect your next row of DIMENSIONS to align:\n" (list "_:L" (append '((0. (setq ss_1 (LM:ssget "\nSelect your first row of DIMENSIONS to align:\n" (list "_:L" (append '((0. will be + '" (itoa set_dim_space) "' spacing each time.\n: -\n"))) (defun c:DTAR nil (c:Dim_Text_Align_Reset))Įnt_1 (car (entsel (strcat "\n: -\nSelect base DIM, then 1st row of DIMs'. (defun c:-Dim_Text_Align_Reset (/) (LOAD "3dwannab_Dim_Text_Align_Reset") (c:DTAR)) (see set_dim_space in the DIMENSION spacing options below).Change to your requirements. Then the LISP will add a spacing value to the next row of dimensions. Instead you run the command and do the first row of DIMENSIONS with a spacing of '0'. I tried setting ss_1 variable to nil but no luck. I really thought I had created a good script until, I spotted this. The 2nd row of dims are not spaced the same either. The for any subsequent rows it adds a value of 10.īut as you can see the first row gets messed up after selecting the 2nd row in the GIF. I've updated the script to now select the first row of DIM with a DIMSPACE value of 0. (princ (strcat "\n > " (itoa (setq len (sslength ss))) (if (> len 1) " text positions on selected dimensions have been reset" " text position on selected dimension has been reset") " <<< \n")) (cdr (assoc 279 (entget (tblobjname "dimstyle" (vla-get-stylename dObj))))) Grap the DIMTMOVE (=TextMovement) from the dimstyle: (vlax-for dObj (setq ssAct (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object))))
#Cad for mac default dimtext value code
There must be some property controlling this that is not exposed to (Visual) Lisp.īut since the code adds an override for the TextMovement property it may be better to get the value from the dimstyle: I am stumped by this as well (BTW: BricsCAD doen't have a _DimSpace command), and kudo's to you for finding a solution. (princ "\nType \"Dim_Text_Reset\" OR \"DTR\" to Yes, value 0-2 are accepted. (princ "\n3dwannab_Dim_Text_Reset.lsp | Version 1.3 | by 3dwannab\n") > " (itoa (setq len (sslength ss_1))) (if (> len 1) " text positions on selected dimensions have been reset" " text position on selected dimension has been reset") " <<< \n")) (princ (strcat "\n > " (itoa (setq len (sslength ss_1))) (if (> len 1) " dimensions have been 0'd" " dimension has been 0'd") " > DIMSPACE to '0' not performed. (= (cdr (assoc 0 ent_1_data)) "DIMENSION") (strcat "\nDIMPACE TO 0 ?\n:-:\nWill reset the dimensions with a DIMSPACE value of '0'.\n:-:\n : "Įnt_1 (car (entsel "\nPlease select a DIMENSION as a base point\n:-:\n")) (or (vla-EndUndoMark acDoc) (vla-StartUndoMark acDoc)) (setq acDoc (vla-get-ActiveDocument (vlax-get-acad-object))) (not (wcmatch (strcase errmsg) "*CANCEL*,*EXIT*")) (princ "\nType \"Dim_Text_Reset\" to Invoke\n") (princ)Īnother thing, I've added a dimspace to '0' function seeing as it now no longer messes anything up. (princ "\n3dwannab_Dim_Text_Reset.lsp | Version 1.2 | by 3dwannab\n") (princ (strcat "\n > " (itoa (setq len (sslength ss_1))) (if (> len 1) " text positions on selected dimensions have been reset" " text position on selected dimension has been reset") " <<< \n")) Regular old command to then set the dim text position to home. These just mess around with the default which will mean it'll work for all dim style variants. (vlax-for dObj (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object))) (defun c:Dim_Text_Reset (/ ss_1 dObj len ) 1.2 - Fixed ACAD bug where the text doesn't want to reset position after the DIMSPACE command. 1.1 - Add nothing selected and selection input for user. I'll leave them there if anyone can spot what was actually wrong. Those attachments are just the vla and dxf outputs of the 2 dims. Sorry I accidentally edited my post instead of a new one.
