Recent Posts

Pages: [1] 2 3 ... 10
1
General Visio / Re: Show text when double clicking on shape
« Last post by grumpyguy6 on Today at 01:23:05 PM »
See attached.

Since this is simplist scenario, just using a hard-coded syntax, there is no need for layers or groups.
THANK YOU SO MUCH!!!!!!!!!!!!!!!!!!!!!!!!! You are the best!
2
General Visio / Re: Find/Replace
« Last post by wapperdude on Today at 01:05:08 PM »
The code as you provided it, does run.  However, the displayed result shows "0" not a blank, which is presumably preferred.
 
Adding the chr(34) syntax corrects this.  Since this makes the entry a null string, rather than an empty numeric value.  For convenience, here's update to your code:
Code: [Select]
Sub ClearConnectorNumbers()
Dim vsoSelect As Visio.Selection
Dim vsoShape As Visio.Shape
Dim vsoShapes As Visio.Shapes
 
Set vsoSelect = Visio.ActiveWindow.Selection
 
If vsoSelect.Count > 0 Then
    For Each vsoShape In vsoSelect
        Call NumberShape(vsoShape)
    Next vsoShape
Else
    MsgBox "You Must Have Something Selected"
End If
 
End Sub
3
General Visio / Re: Show text when double clicking on shape
« Last post by wapperdude on Today at 12:47:35 PM »
See attached.

Since this is simplist scenario, just using a hard-coded syntax, there is no need for layers or groups.

4
General Visio / Re: Show text when double clicking on shape
« Last post by wapperdude on Today at 12:20:25 PM »
To your previous question...yes, you missed something...you didn't modify the formula, as previously indicated, to point g o the list shape.  Right now, it just points to the shape containing it.
5
General Visio / Re: Show text when double clicking on shape
« Last post by grumpyguy6 on Today at 12:15:41 PM »
OK, I put "=SETF(GetRef(HideText),NOT(HideText))" into the double click event, however it just hides the text in the existing column. I'm trying to set it up so that clicking on the shape will open up a separate box. Did I misunderstand something?
6
General Visio / Re: Find/Replace
« Last post by wapperdude on Today at 11:53:57 AM »
I would use the "formula" syntax that Visio Guy shows with the chr(34)'s. 

Nonetheless, in general, if you have both the drawing window and VBA windows open, next to each other, so both can be seen...in drawing window, select your shape, then mouse click somewhere in the main code block.  Now, press "f8",  and the code will execute line by line with each f8 press, including the macro calls and their code.  (Oh, you should also open the shapesheet and make it visible to watch changes to it.)

This process allows you to see result of each step, and to see if code executes as expected.  Note, after a step executes, hover mouse over a portion of the step (or previous steps) to see what values the code is using for each variable.
7
General Visio / Re: Show text when double clicking on shape
« Last post by grumpyguy6 on Today at 11:48:31 AM »
I can think of two ways to do this...
1) using layers
2) using a grouped shape

First approach is nice in that the list shape can be placed easily, independently of the reference shape.  But, it does mean a layer for each list shape.  Certainly doable. 

Second approach creates a "hard" link between ref and list shapes...which gets severed if ungrouped. But, very easy to copy paste on same or different pages.  The dbl click formula above, placed at group level shapesheet, gets modified to such that "HideText" becomes "Sheet.xyz!HideText".  The xyz would be the ID number of the list shape. 

Note, a text shape / box is just a regular shape with no lines or with lines hidden.  In geometry section, there is option to hide lines in upper banner of the section.

Wapperdude
Great! I like option 1, I can live with having to make multiple layers. I know how to add a shape to a layer, so all I need to do is put the following into the Event DblClick cell:  =SETF(GetRef(HideText),NOT(HideText))?
8
General Visio / Re: Show text when double clicking on shape
« Last post by wapperdude on Today at 11:28:25 AM »
I can think of two ways to do this...
1) using layers
2) using a grouped shape

First approach is nice in that the list shape can be placed easily, independently of the reference shape.  But, it does mean a layer for each list shape.  Certainly doable. 

Second approach creates a "hard" link between ref and list shapes...which gets severed if ungrouped. But, very easy to copy paste on same or different pages.  The dbl click formula above, placed at group level shapesheet, gets modified to such that "HideText" becomes "Sheet.xyz!HideText".  The xyz would be the ID number of the list shape. 

Note, a text shape / box is just a regular shape with no lines or with lines hidden.  In geometry section, there is option to hide lines in upper banner of the section.

Wapperdude

9
General Visio / Re: Find/Replace
« Last post by hill041 on Today at 11:00:46 AM »
Thanks for you time and response. Its not stopping now but the particular property I'm trying to change is still not changing.

Here is my code as I've adapted it. Can you see where I'm going wrong?


Public Sub ClearConnectorNumbers()
Dim vsoSelect As Visio.Selection
Dim vsoShape As Visio.Shape
Dim vsoShapes As Visio.Shapes

Set vsoSelect = Visio.ActiveWindow.Selection

If vsoSelect.Count > 0 Then
For Each vsoShape In vsoSelect
Call NumberShape(vsoShape)
Next vsoShape
Else
MsgBox "You Must Have Something Selected"
End If

End Sub

Public Sub NumberShape(vsoShape As Visio.Shape)
Dim subshp As Visio.Shape

If vsoShape.CellExistsU("Prop.LabelStart", True) Then

vsoShape.CellsU("Prop.LabelStart").Formula = ""

End If

If vsoShape.Shapes.Count > 0 Then
For Each subshp In vsoShape.Shapes
Call NumberShape(subshp)
Next subshp
End If

End Sub
10
General Visio / Re: Find/Replace
« Last post by Paul Herber on Today at 10:37:34 AM »
Try:
Call ProcessShape(vsoShape)
Pages: [1] 2 3 ... 10