Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Padding size of Crow's Foot Attribute in Visio 2013?

Just a simple question from me, have been searched for hours but didn't find any. I'm making a database design using Crow's Foot Database Notation in MS Visio 2013, Here's my design It looks that the padding of each attributes with their surroundings are too big. How too reduce them? I can't find any tool to do it, have tried to increase the font size but the paddings seems to being bigger too.

Thanks before

like image 792
iiandskater Avatar asked Feb 12 '23 10:02

iiandskater


1 Answers

Best Solution

The best solution I have found is to edit the Crow's foot stencil. This can be done using the following steps (all diagrams referencing the stencil must be closed):

  1. In windows explorer navigate to the directory:
    %ProgramFiles%\Microsoft Office\Office15\Visio Content\1033\
  2. Right click and Edit DBCROW_M.VSSX (for metric) or DBCROW_U.VSSX (for US). You might want to back them up first.
  3. In Visio turn on developer mode if you haven't already. File->options->Advanced then under General select Run in developer mode.
  4. Right click on the shape you want to change, for example attribute or primary key attribute. Select edit master->edit master shape.
  5. The shape will open. Right click on the shape and select Show Shape Sheet.
    (If you don't have this option Visio is not in developer mode.)
  6. Under Shape Transform->Height change the height formula and enter.
    (See formulas below.)
  7. Close the Shape Sheet window and the Shape. You will be prompted to update the shape. Click yes.
  8. Save the stencil and close.

Once these steps are complete any new objects created with the stencil will have the new height. You can also load an existing diagram and change the shapes on it to the new shape.

The Formulas

US Original:
=GUARD(MAX(0.375 in,TEXTHEIGHT(TheText,TxtWidth),Sheet.6!TxtHeight))'
New:
=GUARD(MAX(0.25 in,TEXTHEIGHT(TheText,TxtWidth)-0.125,Sheet.6!TxtHeight-0.125))'

Metric Original:
=GUARD(MAX(9 mm,TEXTHEIGHT(TheText,TxtWidth),Sheet.6!TxtHeight))
New:
=GUARD(MAX(6 mm,TEXTHEIGHT(TheText,TxtWidth)-3,Sheet.6!TxtHeight-3))

As you can see on the US I reduced the height by 1/8 inch and on the metric by 3 mm. Feel free to adjust these sizes as you see fit.


Alternative Solution

Once I had Visio in developer mode, I was able to adjust the extra spacing around attributes of an existing diagram without editing the stencil. I basically did the same thing for the individual shapes.

  1. Right click select Show Shape Sheet.
  2. Edit the formula as above.

The problem is this has to be done for each shape which is obviously very time consuming and it seemed quirky about letting me save it.

Credit

I found this information on this post and this Microsoft documentation.

like image 198
Billy Avatar answered Feb 14 '23 11:02

Billy