Visio Guy

Visio Discussions => Visio 2010 Issues => Topic started by: Raleglover on September 02, 2012, 08:55:33 PM

Title: visLayerVisible not available
Post by: Raleglover on September 02, 2012, 08:55:33 PM
Hi all,

I am trying to execute a statement(s) like ...

vsoLayer.CellsC(visLayerVisible[/color]).FormulaU = "0"

... but my intellesense (Visual studio 2010) doesn't show visLayerVisible as a choice. There are tons of other visXXXXXXXX choices, but not visLayerVisible. I'm importing the .NET DLLs from visio professional. I don't have any prior Visio versions installed.

I've read through lots of examples that show the use of visLayerVisible with no hint of a speclal Import or not being supported in 2010.

Looking for some help. Thanks!
Title: Re: visLayerVisible not available
Post by: aledlund on September 03, 2012, 10:58:29 AM
how are you defining/assigning vsoLayer?
al
Title: Re: visLayerVisible not available
Post by: Jumpy on September 03, 2012, 12:58:24 PM
http://msdn.microsoft.com/en-us/library/office/ff768547.aspx

Should be 4, although using magic numbers is not really clean code.
Title: Re: visLayerVisible not available
Post by: aledlund on September 03, 2012, 02:12:45 PM
add

imports Microsoft.Office.Interop.Visio.VisCellIndices

to your definitions (vs2010 doesn't drill down very well into visio definitions). The trick is to look up the definition in the Object Browser to find which enumerations you need.

al