Action section "hidden" cells?

Started by Gustavo, July 07, 2020, 08:27:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Gustavo

While I was creating an Action section and Rows with VBA, I used the macro recorder and when I add a new row in the Action section, it generates code that seems to add along with the common cells we know a Prompt cell and an Help cell, like this:
Application.ActiveWindow.Shape.CellsSRC(visSectionAction, RowNum, visActionPrompt).FormulaForceU = """"""
Application.ActiveWindow.Shape.CellsSRC(visSectionAction, RowNum, visActionHelp).FormulaForceU = """"""


These cells doesn't show in the Action section. Does anybody know where they come from, if are they functional and if so which functionality they have? I couldn't find any reference to this.

Regards

Surrogate

#1
which version of Visio do you use ?

You can read about cells from Action section:
I find Section Action Prompt cell description, but can't find Section Action Help cell description

vojo

no such thing as actions.hidden or actions.help  cell

Are you talking about actions.invisible cell?   that would hide/show the action row on the drop downs.

google "visio shapesheet actions cells"   That will show the info on each cell in the actions row


Paul Herber

Can you get hold of a value for these two cell references? Display then in a debug window. Which version of Visio?
Electronic and Electrical engineering, business and software stencils for Visio -

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

Surrogate

#4
All sections have unused cells! For example if you run this macro for some shape, which have Action section.
Sub test()
Dim i As Integer, sh As Visio.Shape
Set sh = ActiveWindow.Selection(1)
For i = 0 To sh.Section(visSectionAction).Row(0).Count
    Debug.Print i, , sh.CellsSRC(visSectionAction, 0, i).Name
Next
End Sub
you get output like this
Quote0                          Actions.Row_1
1                          Actions.Row_1._Unused1
2                          Actions.Row_1._Unused2
3                          Actions.Row_1.Action
4                          Actions.Row_1.Checked
5                          Actions.Row_1.Disabled
6                          Actions.Row_1.ReadOnly
7                          Actions.Row_1.Invisible
8                          Actions.Row_1.BeginGroup
9                          Actions.Row_1.FlyoutChild
10                         Actions.Row_1I11
11                         Actions.Row_1J11
12                         Actions.Row_1K11
13                         Actions.Row_1L11
14                         Actions.Row_1.TagName
15                         Actions.Row_1.ButtonFace
16                         Actions.Row_1.SortKey
17                         Actions.Row_1P11

PS
This screenshot describe which constants used for these cells !

Paul Herber

Odd, looks like these cells show in VBA but they're not listed in the SDK, nor are they available via C#.
Electronic and Electrical engineering, business and software stencils for Visio -

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

Surrogate

Paul, which SDK do you mean ? In online resource i find this
Quote from: Article Prompt Cell (Actions Section) at docs.microsoft.comPrompt Cell (Actions Section)
Beginning with Visio 2002, this cell is no longer used.
This cell last time used in version Visio 2000. In pre-Microsoft era :)

Paul Herber

Ah, it's an old cell reference. I hadn't thought of that possibility.
Electronic and Electrical engineering, business and software stencils for Visio -

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

Surrogate

Quote from: Paul Herber on July 09, 2020, 12:37:32 PMAh, it's an old cell reference.
Paul, you are right ! This article from SDK for Visio 2013.
Latest SDK was for Visio 2016.
Quote from: Paul Herber on July 09, 2020, 02:14:51 AMCan you get hold of a value for these two cell references?
Visio 2016 Standard, i can get value from these cells, also i can change values and formulas in these cells with VBA-macro.

wapperdude

Ah!  Other than the mystery of it all, is there anything useful...or just merely placeholder/relics of the Cretaceous period???
Visio 2019 Pro

Surrogate

#10
Quote from: wapperdude on July 09, 2020, 01:25:11 PMOther than the mystery of it all, is there anything useful
Sometimes i use this trick, just write formula with SETF via macro in cell which dont displayed in ShapeSheet.
For example prevent change cell's value to 0.
Set sh = ActiveWindow.Selection(1)
sh.CellsSRC(visSectionAction, 0, visActionPrompt).FormulaForceU = "SETF(GetRef(LockDelete),GUARD(1))+DEPENDSON(NOW())"


Surrogate

If check protected cell in Trace window you can find cell

vojo

like CERN, we have identified a new cell in the action row.
So what does it do?

Surrogate

IMHO, this cell is exist but don't used in current time.

Sections in ShapeSheet have structure like table. Columns ActionPrompt and ActionHelp was added in Action section
as first time. Another columns added in same time or later. In Visio 2002, these columns obsolete.
MS for keep compability, saved these columns and their positions. But make it invisible for users view :)
These cells available only via VBA.

Paul Herber

It does make sense. The cell definitions have to stay available to VBA otherwise any macros that use them will break for the user. Any addin/addon written in C++/C# wil still run for the user, but any attempt to compile the code will fail.
Electronic and Electrical engineering, business and software stencils for Visio -

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