Menu
  • HOME
  • TAGS

Choose active page in Visio

excel,excel-vba,visio

Try: VsApp.ActiveWindow.Page = vsPage If that doesn't work, try: VsApp.ActiveWindow.Page = VsApp.Documents.Open(FName).Pages(vsPage) ...

Reading the contents of Microsoft Visio (2010) doc in IronPython

ironpython,visio

You could start with something like this... it's pretty straightforward I suppose.. ....... ....... page = visapp.ActivePage for shape in page.Shapes: if not shape.OneD: print shape.Name + " '" + shape.Text + "'" for connectedShapeId in shape.ConnectedShapes(2, ""): connectedShape = page.Shapes.ItemFromID[connectedShapeId] print " => " + connectedShape.Name + " '"...

Add VBA Project to Visio Document by Using Code?

vba,macros,visio

You have a couple options here: Force every user to allow programmatic access to the VBA project for their documents, and use VBA automation to add code. This works nicely when you have programmatic access, but this can be difficult to assure. If you're not using Visio 2013, you can...

Getting sub-shapes on Layer with CreateSelection

vba,visio

CreateSelection can also be used on a group shape to get sub-shapes, but I do not think that you can create a selection of all page shapes and group sub-shapes in a single line. You would need to build up the selection from many CreateSelection calls (one at page, and...

Add and Invoke a VBA Sub on Visio Macro using C#

c#,vba,macros,visio

Visio doesn't have a Run method on the Application object, but it does have Document.ExecuteLine: 'Executes the macro (procedure without an argument) named "SomeMacro" 'that is in some module of the Visual Basic project of ThisDocument. ThisDocument.ExecuteLine("SomeMacro") 'Executes the procedure named SomeProcedure and passes it 3 arguments. ThisDocument.ExecuteLine("SomeProcedure 1, 2,...

VISIO count shapes in container

vba,shape,visio

The error is because you have declared the vsoPage but you never assigned it to any page in your document. Add a line such as this to initialize it and the error goes away: Set vsoPage = ActivePage ...

Visio, Copy shape data to other objects

ms-office,visio,shapes

You can use "shape data sets" Open shape-data window. Right-click, select "Shape data sets" => new window "shape data sets" will be opened. Select source shape, in the "shape data sets" click "Add set", name it somehow (e.g. "my dataset"). Set checkbox on "my dataset", select target shapes, click "apply...

Adding a shape without changing connectors

c#,visio,office-addins

I was able a similar effect by locking all layers before adding my shape. For my needs, I left them locked, until the shapes were not needed anymore and I removed them, and then unlock the layers: foreach (Visio.Layer layer in Application.ActivePage.Layers) { layer.CellsC[(short)Visio.VisCellIndices.visLayerLock].Formula = "1"; } // Add my...

I cannot add views when reverse engineering my database in Visio

sql-server,views,reverse-engineering,visio

You are probably using "wrong" data provider to reverse engineer the database, and that is the reason why views are disabled. There are some issues with Visio not being updated to support newer SQL server versions. Try the following: Start "reverse engineer" wizard Select Generic OleDb data provider (not the...

Visio Static Connectors - How do you place them?

static,visio,connector

You could try something like the following: //drop a connector onto the page, then connect them public void dropStaticConnector( Shape sFrom, String connectionPointName1, Shape sTo, String connectionPointName2) { // drop a default connector var conn = ActivePage.Drop(Application.ConnectorToolDataObject, 0, 0); // glue it to the connection points conn.Cells("BeginX").GlueTo(sFrom.Cells("Connections." + connectionPointName1)); conn.Cells("EndX").GlueTo(sTo.Cells("Connections."...

One-to-many - many-to-many challenge in ERD

database,visio,erd

You don't need to create a ChefsInRestaurant table.Add a foreign key attribute to chief table(FK_rest_Name). In your example ıt shows one chief can work for more than one rest.

Extract graph elements from Visio document using php or python

php,python,visio

Yes, it is possible to query visio shape information (shape types, text, connections, etc) programmatically. Visio provides COM API which you can use form any language which can call COM API, python for example (using e.g. either .NET module (clr) or win32com module). Here is a similar question: Reading the...

How to hide Visio 2013 when using interop assembly in PowerShell

powershell,office-interop,visio,powershell-v4.0,visio2013

You can try this: $visio = New-Object -ComObject Visio.InvisibleApp $visio.Quit() Note that it's not a must to use Add-Type (however you can go also with Add-Type, in this case try Microsoft.Office.Interop.Visio.InvisibleAppClass BTW, there is a library for using Visio from PS: https://visioautomation.codeplex.com/...

Visio Document Variable

c#,visio

First option is already voiced by @Jon Fournier. DocumentSheet is a Visio way to store document-specific values. Check out also this article, which gives more details: http://visualsignals.typepad.co.uk/vislog/2011/11/shapes-with-global-values.html The second option could be Document.SolutionXmlElement, which allows you to store arbitrary XML fragment in Visio file for a document. https://msdn.microsoft.com/en-us/library/office/aa218416.aspx Third option...

Visio 2013 Describing Sub-activities with Call Behavior Actions

uml,visio,activity-diagram

According to this video (the introduction with the use case is quite disappointing), the representation of sub-activities with Visio seems less integrated with the tool than in Visual Studio, but possible anyway. It worked with Visio 2007. Should work with Visio 2013......

New Created Custom List Shape Doesn't Work in Microsoft Visio 2013 x64

shape,visio,shapes,stencils,shapesheet

Answer of 1st Question: This problem always is for don't attend to the "Category" word. In most cases, people don't attend to that word and use the "Shape Master Name" instead of "Shape Category"; however, they're different with each other. In my case, I was being entered the Shape Master...

Connecting sql server to Microsoft Visio

sql-server,database-connection,visio

Reverse Engineering option was removed from Visio 2013. Use previous version of Visio to reverse-engineer a database.

In an Entity Relationship Diagram how do you deal with Null data?

sql,attributes,entity,entity-relationship,visio

The way I learned ERDs you have your 'Comments' entity with the attributes. When listing the attributes you can also include metadata about them - datatype, allows nulls, etc. I think you can list 'allows nulls' beside the attributes. However, if 'Email' is your primary key, you can't have a...

Python Visio to pdf

python,pdf,visio,comtypes

You should use ExportAsFixedFormat instead SaveAs. Documentation for this function you can find here. This function can be used with a win32 and a comtypes. win32com example import win32com.client visio = win32com.client.Dispatch("Visio.Application") doc = visio.Documents.Open('map.vsd') doc.ExportAsFixedFormat( 1, 'map.pdf', 1, 0 ) comtypes example import comtypes.client as coms visio = coms.CreateObject('Visio.Application')...

Visio 2013 - How to make custom line pattern with an existing stencil

line,visio

As you drag/drop or copy a shape from an existing document into a new document Visio will also copy across any associated styles at the same time. The same goes for masters - copy a master from one stencil to another and you'll bring the style with you. If you...

Add some (Master) Shapes to another (Master) Shape in Microsoft Visio 2013 x64 when add a (Master) Shape to the Page

shape,visio,shapes,stencils,shapesheet

This feature is called "List" (structured diagram) in Visio (was introduced in Visio 2010). To allow this sort of functionality (allow some shape to "accept" others similarly to "class" shape), you need to declare the shape to be a "list", by setting the user property User.msvStructureType="List" in it's shape sheet....

How do I use a shape's ID from another field to define beginX

vba,visio,shapesheet,visio-2010

Thanks for helping all. A combination of all advice led me to an alternative solution. Instead of trying to refer to the field in the Shapesheet that does contain the BeginItemValue, I built the entire string (in VBA) by concatenating the parts and then updated the BeginX value with it....

Manipulate visio shapes with data passed from vb.net

vb.net,visio

You'll have to change the way you're opening and printing Visio documents. This tutorial shows how to use VB.NET to work with documents. The Open function returns an object of type Microsoft.Office.Interop.Visio.Document. You can use this object to attach information to shapes as discussed in here. In fact, the VB.NET...

Visio add-in getting the font size of shape's text

c#,office-interop,visio

I was successful in obtaining the formula by: string fontSize = shape.CellsSRC[(short) Visio.VisSectionIndices.visSectionCharacter, (short) Visio.VisRowIndices.visRowCharacter, (short) Visio.VisCellIndices.visCharacterSize].Formula; Or by: string fontSize = shape.CellsSRC[3,0,7].Formula; Which is practically the same, only not very readable, Or by: string fontSize = shape.get_Cells("Char.Size").Formula; ...

Run Macro on add/drop - Visio

vba,macros,containers,visio

The Visio Shapesheet EventDrop cell lets you specify code to call when the shape is dropped on the page. It also works when duplicating the shape. If it's a VBA macro then you can use CALLTHIS or RUNMACRO. CALLTHIS requires that the first argument in your VBA macro is a...

Visio Drag Events Out of Order

vba,drag,visio

The sample code at: https://msdn.microsoft.com/en-us/library/ff767482(v=office.15).aspx shows how to set up event monitoring using Visio's AddAdvise method, and get a categorization of what type of MouseMove event is occurring. Using this method and logging /drop events, it seems that Visio is passing the same event multiple times under the low-memory conditions,...

Create a new stencil from a master shape in Visio 2013 Professional

visio

The shape is designed to prevent easily changing this property, so you need to brute-force your way through this. Open up the master's shapesheet and change the LineFormat/EndArrow cell formula to 0 (or GUARD(0) if you prefer).

Installed Visual Studio 2005 Tools for Office Second Edition - Add Visio Panel to Toolbox

winforms,vsto,visio

VSTO is for a different thing (it's for creating Visio addins), it is, well, unrelated to what you are after. There are two Visio controls you can use in your C# application: Visio Viewer control (allows you to view Visio drawing in a C# application), and Visio Drawing control (allows...

Get layer of connector

vba,visio,visio-vba,visio-2010

I'm not completely clear on your issue, but there's nothing special about connectors - they're still just shapes. So if you know the index of your target shape and layer, then you can use your code above. Shapes in Visio can also belong to multiple layers (layers don't work in...