Hi All,
With the attached file, I can't modify the line space within the text block. If I make the text larger or smaller nothing...
Please advise.
- j
Line Spacing.dwg
|
Hi All,
With the attached file, I can't modify the line space within the text block. If I make the text larger or smaller nothing...
Please advise.
- j
Line Spacing.dwg
You can't change the line spacing in a dimension. The text size specified for the dim is 0.8 and the line spacing is based upon that. You've overridden the text size to 0.2, but the line spacing remains the same. Start by setting up your text style and then your dim style. Your text style was set to a fixed text height. Setting it to 0 allows you to specify a text height later and it can vary for individual text items. Then in your dim style, you can specify a text height. Avoid making changes by overriding the dim style. Once you create the dim object, the line spacing is set for that dim object. It is based on the text height at the time of creation. Unfortunately, you will have to recreate the dim based on the new changes you made to the dim style.
This will toggle the Line Space Factor between 1.0 and 0.8Display Name: Toggle Line Space FactorCode:(defun c:DimLnSpcX ( / ss i ent el) (if (setq ss (ssget '((0 . "Dimension")))) (repeat (setq i (sslength ss)) (setq ent (ssname ss (setq i (1- i))) el (entget ent '("ACAD")) ) (if(= 1(cdr(assoc 41 el))) (entmod (subst (cons 41 0.8)(assoc 41 el)el)) (entmod (subst (cons 41 1.0)(assoc 41 el)el)) );; if );; repeat );; if (princ) );; DimLnSpcX
Name: DimLnSpcX
Macro:XCode:^P(or C:DimLnSpcX (load "DimLnSpcX.lsp"));DimLnSpc
Command line: (load "DimLnSpcX.lsp") DimLnSpcX
I've added to the Dimension Object Menu in Shortcut Menus in the CUI, just right-click a dimension and pick 'Toggle Line Space Factor'.
Also add it to Dimension Objects Menu and it will work for multiple selected dimensions as well.
@Tom, that's helpful as there is no other way to edit line spacing via the acad UI.
@ -j, Tom's routine may not get you what you want with the existing dim in your sample dwg because you've overridden the text height. The factor of .8 will be based upon the text height for the dim, which is also, 0.8 and you have overridden the text height to 0.2.
Thanks to both of you. That has cleared up everything. It works now if I start from the beginning.
I use AutoCAD more as an "illustrator" program and less as a CAD. But it helps to know what I'm doing.
Cheers.
@ Tom, It will take me a little longer to figure out how to use the code.....but thanks.
- j
Open Notepad, paste the text in and saveas a *.lsp file. Make sure you have the file type list box set to "All files" or notepad will add a txt extension. Then you load the file into AutoCAD and type the command at the command line. To load, you can use the second line of code Tom posted or drag the file from explorer to acad.