News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

How to quickly delete shape data

Started by RuSty, February 07, 2013, 08:38:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RuSty

How can I quickly delete all shape data?

When I want to delete shape data I must right click on the shape go to Data>Define Shape Data and then delete each row by clicking button delete.
I'm beginner in Visio and maybe there is an another way?

Paul Herber

A quicker way is Open Shapesheet, scroll down to the Shape Data section, right-click on one of the rows and select Delete Section.
How you get to Open Shapesheet depends on which version of VVi you are using, and you will need to be in developer mode.
Open Shapesheet used to be  on the  Wndow menu, but Visio 2010 onwards it is on the Developer tab.
Get into developer mode from thje Options menu.

Another way to delete all the shape data (and can do more than one shape at a time), is to install my SupeUtils for Visio:
http://www.sandrila.co.uk/visio-utilities/
and use menu Super Utils -> Shape -> Delete -> Custom Properties
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Surrogate

#2
Hi there,

I am not begginer in visio, but i don't know how delete all fields of shape data by one click using standard visio commands ! Try this macro
Sub RuSty()
Dim sel As Selection
Dim selsh As Shape
Set sel = ActiveWindow.Selection ' create "selection"
For x = 1 To sel.Count           ' iterate all shapes (from first to last) in selection
Set selsh = sel(x)               ' set current selected shape
selsh.DeleteSection visSectionProp ' in current shape delete section "Shape Data", like as via shapesheet :)
Next x
End Sub

PS: Paul,

Thank you, i forget about way via shapeseet ;)

RuSty

Thank you Paul and Surrogate information very helpful. I've tried the utility and macros very convenient. I will use these methods :)

RuSty

Have a new problem)

When I use manually way to delete shape data and then drag new data to the shape, table shown A-Z, but when I use your very fast and convinient way new data that I drag to the shape shown in random order. Don't know why it is happens :(

Surrogate

Quote from: RuSty on February 07, 2013, 09:37:25 AM
Have a new problem)

When I use manually way to delete shape data and then drag new data to the shape, table shown A-Z, but when I use your very fast and convinient way new data that I drag to the shape shown in random order. Don't know why it is happens :(
i dont understand which table you are mean, that shown A-Z ? Please show me your screenshot with this table !

Paul Herber

The order of the data depends on the sort key. What sort key do you have set? You can see this in the Define Shape Data dialog.
How are you dragging the shape data?
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Surrogate


RuSty

#8
I made a video. My mistake that it was not problem of sort. When I use macros and then drag new data, old data returns.

Sorry for my bad english, hope video show the problem.

http://www.youtube.com/watch?v=5oUYSDSR1XI

Surrogate

#9
RuSty, I forgot about bug of Visio - when all section deleted and at once and new row. All old rows are return.
Try this code. There deleted not all section immediately, there deleted each row in this section!
If you prefer delete section via shapesheet, please save file after this operation, then deleted rows don't return in section

Sub RuSty()
Dim sel As Selection
Dim sec As Section
Dim selsh As Shape
Set sel = ActiveWindow.Selection ' create "selection"
For x = 1 To sel.Count           ' iterate all shapes (from first to last) in selection
Set selsh = sel(x)               ' set current selected shape
For y = selsh.RowCount(visSectionProp) - 1 To 0 Step -1
selsh.DeleteRow visSectionProp, y ' in current shape delete current row in section "Shape Data"
Next y
Next x
End Sub


My English is little too :)

я забыл про этот баг Визио - если удалить секцию и тут же начать добавлять в нее строки. Все старые строки возвращаются
попробуй этот код, он удаляет не всю секцию, а каждую строку по очереди
Если ты предпочитаешь удалять секцию через Шейпшит, сразу же сохрани файл. Тогда удаленные строки не вернутся


Paul Herber

Your English is better that most other people's Russian (and Estonian)!

Yes, I reported that bug on one of the official forums a few years ago and got flamed by a moderator as it was obviously a fault in my code (I was writing in Delphi and not a real MS approved language).

Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

RuSty

Big thanks macro works. It will save a lot of time for me. I don't know what I would do without this forum :)

Thanks to all again!

Surrogate

#12
Now you know that exist a russian speaking forum too :)

RuSty


Yacine

If the shape has no special features, you might consider joining it. Visio will only keep the geometry section.
Yacine

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: 434 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1279KB.
Tokens: post-login.
Cache hits: 13: 0.00180s for 26,721 bytes (show)
Cache misses: 3: (show)
Queries used: 16.

[Show Queries]