I need dots between tabs.

I need dots between tabs.

KarlHanson
Advocate Advocate
2,192 Views
12 Replies
Message 1 of 13

I need dots between tabs.

KarlHanson
Advocate
Advocate

I am making a sheet list and would like dots between the sheet name and the sheet number.  Can I tab over and have dots automatically put in, similar to a Word document?  Thanks. 

0 Likes
2,193 Views
12 Replies
Replies (12)
Message 2 of 13

natasha.l
Alumni
Alumni

Hello @KarlHanson

 

Thanks for posting in the forums. 

 

Can you please provide us an example of what you are referring too. 

 

Please "Accept Solution" if a reply or replies have helped resolve the issue or answered your question, to help others in the community.

0 Likes
Message 3 of 13

KarlHanson
Advocate
Advocate

Site Plan..............1

Grading Plan.......2

Details..................3

0 Likes
Message 4 of 13

JTBWorld
Advisor
Advisor

You can't with just AutoCAD. It would require programming customization. 


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

0 Likes
Message 5 of 13

CodeDing
Advisor
Advisor

@KarlHanson ,

 

I dont really have the expertise to open Word for you and write it to a new doc (can't be too hard though)..

But here's a command you can run that will create what you're looking for and copy it directly to your clipboard!

(Assuming you're using Windows)

(defun c:TEST ( / final cnt layList len tmp fName f)
;helper function(s)
  (defun Layorder (/ order) (vl-load-com)
    ;from pbejse @ https://forums.autodesk.com/t5/user/viewprofilepage/user-id/564264
    (vlax-for lay (vla-get-layouts (vla-get-ActiveDocument (vlax-get-acad-object)))
      (setq order (cons (list (vla-get-name lay) (vla-get-taborder lay)) order))
    )
    (mapcar 'car (Cdr (vl-sort order '(lambda (j k) (< (cadr j) (cadr k))))))
  );defun
;Get list of ordered layouts, then get largest strlen (+3)
(setq final "" cnt 0 layList (Layorder))
(setq len (+ 3 (apply 'max (mapcar 'strlen layList))))
;create final string
(mapcar '(lambda (x) (setq tmp "" cnt (1+ cnt))
		     (repeat (- len (strlen x)) (setq tmp (strcat tmp ".")))
		     (setq final (strcat final "\n" x tmp (itoa cnt))))
	layList)
;create temp file, and copy created text to clipboard
(setq fName (vl-filename-mktemp))
(write-line final (setq f (open fName "w"))) (close f)
(command "_.SHELL" (strcat "clip < \"" fName "\""))
;finish up (prompt final) (prompt "\nLayout order copied to clipboard...") (princ) );defun

Example Output (from command history & placed in clipboard):

Site Plan......1
Grading Plan...2
Details........3

Best,

~DD

0 Likes
Message 6 of 13

Sea-Haven
Mentor
Mentor

Sounded good on paper, but in reality does not work, it depends entirely on which font you use wether it will work or not.

 

In fonts there is a thing called kerning. 

 

So the only way to work is with fonts that have each character as a set width simplest example is I v's W.

 

screenshot131.png

Message 7 of 13

CodeDing
Advisor
Advisor

Ahh yes, that darn kerning!

OP will need to give us more feedback to reach their desired result if that is the case.

0 Likes
Message 8 of 13

devitg
Advisor
Advisor

As I see,  the OP ask to change lay-out-tab names , AS it is was in WORD 

 

Can I tab over and have dots automatically put in, similar to a Word document? 

Not to send such names to a WORD doc. 

 

 

 

 

0 Likes
Message 9 of 13

john.uhden
Mentor
Mentor

I think that's called a "monospace" or "monotype" font, where all characters are the same width.

John F. Uhden

0 Likes
Message 10 of 13

Kent1Cooper
Consultant
Consultant

@KarlHanson wrote:

....  Can I tab over and have dots automatically put in, similar to a Word document?  .... 


Mtext tab options don't include series of dots as in what MS Word calls a "leader" tab [the dotted variety is their type 2].  You would need to fake it by using a monospaced font and something like @CodeDing 's suggestion in Message 5, or if you already have text content with both pre-"tab" and post-"tab" parts, pulling the text content apart to place periods between the pre-tab and post-tab parts.  If the post part is always numbers, I can imagine a routine in which you would enter a string, and a total number of characters, and it would find the numerical-only characters at the end, separate them from the rest, and put in the periods to fill out the length.  Is that something that would be useful for you, particularly given that it would require you to find a suitable monospaced font?

 

[By the way, "kerning" is not the right word -- what people are talking about is proportional character widths, as opposed to uniform character width in a monospaced font.  Kerning is used  with proportional fonts, but is a process -- adjustment of the spacing between  characters to normalize the apparent  spacing between character combinations that look odd if not kerned.  For example, a T and an A, or an L and a V, because one "sticks out" at the top and the other at the bottom, would be moved closer together by kerning, for a little overlap of their character widths, so they don't have excess visual space between them.  See >this<.]

Kent Cooper, AIA
Message 11 of 13

robmitchellKRL9N
Contributor
Contributor

I use a regular line drawn straight (horz) from the lower right corner of the last character in a table column 1 (or mtext column 1) to the lower left of the first character in the adjacent cell (again..."or mtext column").

Now set the properties...

Change the linetype to Dot
Set the lineweight to at least 1.00MM

Set the color to what you want...

Copy the line down vertically using the Copy...Array (for the number of rows you need).

Finally you can stretch one or more lines at a time to align the left side to your text right after editing that line.

 

You may need to check the colors in you text background you can use the whiteout color for the text background.

 

Be sure when you plot you use those lineweights!

 

It may sound like a lot, but in a CAD guys day...these steps are nothing special...just the daily grind. I process my drawing index tables this way.

 

If you really want to automate this task I would start with the (textbox) function to obtain the typed width of the characters you typed and adjust the line automatically with a single line of lisp code entered at the command prompt that would adjust the end point of the left end of the line for you.

 

One more layer of automation would monitor the table and/or mtext via a lisp reactor to update the dot leader tab lines after you have changed the table/mtext object.

 

There are several ways to perform this tack using a number of objects. 

Over the years I have used an xref "blanket 'o' leader dots" with a xrefclip to handle the changing number of dots

required for each line....,

a single-line array of donuts (yes it is still a command in autocad) so I could use grips to change the number of dots numerically via the properties tab.

 

At the end of the day...I believe this functionality should have been included when tables were first introduced into Autocad...I would have.

HTH.Rob

0 Likes
Message 12 of 13

john.uhden
Mentor
Mentor
I must have missed something. What's wrong with *...*?

John F. Uhden

0 Likes
Message 13 of 13

robmitchellKRL9N
Contributor
Contributor

Pardon me, are you saying that leader tabs are now supported in AutoCAD using "*...*" ?
(a wildcard match using Find/Replace?) without any code?  Got deadlines currently...will test that theory later.

 

0 Likes