per: Saveen Reddy - how to quickly set or clear text on many visio shapes?

Started by visioames, February 09, 2025, 09:32:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

visioames

Looking for this old post from Saveen Reddy.
https://viziblr.com/news/2011/9/3/how-to-quickly-set-or-clear-text-on-many-visio-shapes.html

The tip was copy / paste on multiple shapes incrementing accordingly.  When I copy a number, select shapes, paste, the number stays the same on each shape.  I can't remember how to paste / increment the numbers? Anyone recall this article or know the steps?

Nikolay

You can try https://web.archive.org/ to get dead pages:

how-to-quickly-set-or-clear-text-on-many-visio-shapes.html (working)

https://vimeo.com/28554993 (working)

Looks like there is nothing in the article about incrementing?

wapperdude

I see anything either.  Couple questions.

1) You have a bunch of shapes on a page, some are numbered, some are not. True?

2) You select a numbered shape, and copy its text
3) You select a bunch of unnumbered shapes and want to add sequential numbering, after the copied number.
4) Of the selected shapes, is the order that they get an assigned number important? 
5) If so, what would be the basis for establishing priority?
Visio 2019 Pro

visioames

Quote from: Nikolay on February 09, 2025, 10:24:42 PMYou can try https://web.archive.org/ to get dead pages:

how-to-quickly-set-or-clear-text-on-many-visio-shapes.html (working)

https://vimeo.com/28554993 (working)

Looks like there is nothing in the article about incrementing?

Thanks Nikolay for sharing the web.archive.org link to the old page!
The site with Saveen Reddy tips is: https://vimeo.com/saveenr
including 'Visio 2010 Set text on multiple shapes quickly' (https://vimeo.com/28554993).  I thought this tip included a incrementing numbers (i was wrong).

visioames

Fyi. Linking data to shapes is one solution to achieve the goal: list of numbered shapes.

After linking a list of numbers I created a data graphic to center the number value on each.

wapperdude

Sounds like you've solved the original question re autonumbering.

There is a Number Shapes Add-on that Visio has.  Ribbon>View tab > Macro section >Add-ons > Number Shapes.  It will allow you to set the starting number, and then click each shape to add, automatically incrementing as you go.  There  is an automatic number option, but I believe that only applies to new shapes as they are placed on the page. 
Visio 2019 Pro

wapperdude

To automatically sequence the already placed shapes, the following program may be used.

The process is the sequentially, manually select all shapes of interest by holding the shift key down, and then click on each shape in the desired sequence for processing.  The very 1st shape selected is used as the base for the numbering sequence.  The numbers are placed as ordinary text.

Sub mySub()
'Select shapes seequently, one at at time, in
'the desired sequential order for numbering.
'The first selected shape will be used as the
'base for the sequencing.
'
    Dim selShps As Visio.Selection
    Dim i As Integer
    Dim sTxt As String
   
    Set selShps = ActiveWindow.Selection
    For i = 1 To selShps.Count
        If i = 1 Then
            sTxt = selShps.Item(i).Text
        Else
            sTxt = sTxt + 1
            selShps.Item(i).Text = sTxt
        End If
    Next
End Sub

See attached which may be used to demo the process.  Select the numbered, orange shape 1st.  Then add the other shapes as desired to the selection.  Then, run the macro.
Visio 2019 Pro

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 284 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1135KB.
Tokens: post-login.
Cache hits: 13: 0.00172s for 26,562 bytes (show)
Cache misses: 2: (show)
Queries used: 17.

[Show Queries]