Author Topic: How to quickly delete shape data  (Read 31149 times)

0 Members and 1 Guest are viewing this topic.

RuSty

  • Jr. Member
  • **
  • Posts: 11
How to quickly delete shape data
« on: February 07, 2013, 03:38:50 AM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3310
    • Paul Herber's website
Re: How to quickly delete shape data
« Reply #1 on: February 07, 2013, 03:58:23 AM »
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 and applications for Visio -

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

Surrogate

  • Hero Member
  • *****
  • Posts: 1639
    • ShapeSheet™ Knowledge Base
Re: How to quickly delete shape data
« Reply #2 on: February 07, 2013, 04:03:57 AM »
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
Code
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 ;)
« Last Edit: February 07, 2013, 04:08:38 AM by Surrogate »

RuSty

  • Jr. Member
  • **
  • Posts: 11
Re: How to quickly delete shape data
« Reply #3 on: February 07, 2013, 04:14:06 AM »
Thank you Paul and Surrogate information very helpful. I've tried the utility and macros very convenient. I will use these methods :)

RuSty

  • Jr. Member
  • **
  • Posts: 11
Re: How to quickly delete shape data
« Reply #4 on: February 07, 2013, 04: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 :(

Surrogate

  • Hero Member
  • *****
  • Posts: 1639
    • ShapeSheet™ Knowledge Base
Re: How to quickly delete shape data
« Reply #5 on: February 07, 2013, 05:37:45 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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3310
    • Paul Herber's website
Re: How to quickly delete shape data
« Reply #6 on: February 07, 2013, 06:12:15 AM »
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 and applications for Visio -

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

Surrogate

  • Hero Member
  • *****
  • Posts: 1639
    • ShapeSheet™ Knowledge Base
Re: How to quickly delete shape data
« Reply #7 on: February 07, 2013, 06:46:46 AM »
i think RuSty use way that described in video
consider sessions eight and nine
http://visio.microsoft.com/en-us/Get_Started/How_To/Learn_Visio_2010_from_Visio_MVPs/Pages/default.aspx
al

Thank you. Helpful information
i have slow internet connection and can't see this video :(

RuSty

  • Jr. Member
  • **
  • Posts: 11
Re: How to quickly delete shape data
« Reply #8 on: February 07, 2013, 07:48:11 AM »
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
« Last Edit: February 07, 2013, 07:57:21 AM by RuSty »

Surrogate

  • Hero Member
  • *****
  • Posts: 1639
    • ShapeSheet™ Knowledge Base
Re: How to quickly delete shape data
« Reply #9 on: February 07, 2013, 08:36:27 AM »
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

Code
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 :)

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

« Last Edit: February 07, 2013, 08:51:04 AM by Surrogate »

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3310
    • Paul Herber's website
Re: How to quickly delete shape data
« Reply #10 on: February 07, 2013, 10:58:40 AM »
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 and applications for Visio -

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

RuSty

  • Jr. Member
  • **
  • Posts: 11
Re: How to quickly delete shape data
« Reply #11 on: February 08, 2013, 07:07:56 AM »
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

  • Hero Member
  • *****
  • Posts: 1639
    • ShapeSheet™ Knowledge Base
Re: How to quickly delete shape data
« Reply #12 on: February 08, 2013, 07:26:04 AM »
Now you know that exist a russian speaking forum too :)
« Last Edit: February 08, 2013, 07:47:55 AM by Surrogate »

RuSty

  • Jr. Member
  • **
  • Posts: 11
Re: How to quickly delete shape data
« Reply #13 on: February 08, 2013, 07:40:46 AM »
yes :)

Yacine

  • Hero Member
  • *****
  • Posts: 3005
Re: How to quickly delete shape data
« Reply #14 on: February 08, 2013, 12:30:35 PM »
If the shape has no special features, you might consider joining it. Visio will only keep the geometry section.
Yacine