Author Topic: Shape Linking Cause Hyperlinks to be Created  (Read 412 times)

0 Members and 1 Guest are viewing this topic.

OldSchool1948

  • Jr. Member
  • **
  • Posts: 45
Shape Linking Cause Hyperlinks to be Created
« on: April 02, 2019, 07:56:06 AM »
In ThisDocument, I'm using the following code to verify that a "Server" shape with custom shape data is placed into the correct vnet or subnet when the shape is linked to a data row in the External Data window. 

Code: [Select]
Private Sub m_vsoPage_ShapeLinkAdded( _
                    ByVal vsoShape as IVShape, _
                    ByVal DataRecordSetID as Long, _
                    ByVal dataRowID as Long)

     If isShapeLocOnPageOK(vsoShape) = True then
        If isShapeServerCloud(vsoShape) = True then
             Call deleteShapeHyperLinkSection( _
                        vsoShape)
        End If
     End If
End Sub


The problem is, Visio creates hyperlinks for data elements related to disk sizes (e.g., Disk 1 Size, Disk 2 Size, Disk 3 Size, OS Disk Size), thus, I added code to delete the hyperlink section for "cloud" server shapes.  At no time in subs isShapeLocOnPageOK or isShapeServerCloud do I reference disk size data elements. 

Anyone else ever experience such a thing?

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2768
    • Paul Herber's website
Re: Shape Linking Cause Hyperlinks to be Created
« Reply #1 on: April 02, 2019, 08:16:20 AM »
What is the shape name and what stencil is it in?
Electronic and Electrical engineering, business and software stencils and applications for Visio -

http://www.paulherber.co.uk/

OldSchool1948

  • Jr. Member
  • **
  • Posts: 45
Re: Shape Linking Cause Hyperlinks to be Created
« Reply #2 on: April 06, 2019, 02:39:57 PM »
Sorry, I've been away for a while.

All of the shapes we use have custom shape data with no resemblance to any Visio provided shapes, and stencils are custom made with those shapes.  I maintain an infrastructure design and engineering tool.  Stencils are named:
  • Black Box Shapes
  • Drawing Shapes
  • Enterprise Shapes
  • On-Prem Server Shapes
  • Cloud Server Shapes

A sampling of a typical server's shape data name:
Hidden fields:
ShapeClass - Cloud or On-Prem:
ShapeSubclass - VM or Phys (for physical host)
ShapeType - App Server, Web Server, MS DB, ORA DB, Web Service, Appliance, etc.
ShapeSubtype - Multi, Scaling, Sngl, Phys

Visible fields examples:
ServerName
FunctionalRole
Domain
OU
IPAddress
ApplicationSecurityGroup
etc.

Hyperlinks are also created when I refresh linked Shape data.  This is driving me nuts  :D.  I use code to delete them, but I'd rather fix the issue - if possible.

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2768
    • Paul Herber's website
Re: Shape Linking Cause Hyperlinks to be Created
« Reply #3 on: April 06, 2019, 03:17:28 PM »
Could you post a diagram containing one of these shapes?
Electronic and Electrical engineering, business and software stencils and applications for Visio -

http://www.paulherber.co.uk/

OldSchool1948

  • Jr. Member
  • **
  • Posts: 45
Re: Shape Linking Cause Hyperlinks to be Created
« Reply #4 on: April 08, 2019, 12:04:59 PM »
The attached zip file has a Visio file and Excel file.  The Visio file contains four server shapes.  The Excel file contains four notional server definitions.
Two shapes are linked and have the hyperlinks in question.  The other two are not linked.  If you link them, the hyperlinks are created.  Thanks for your help with this.