473,807 Members | 2,877 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open a visio drawing file and in C# ?

Hi,

I want to open a visio drawing file (.vsd) from hardisk and get the list of
all shape in that file ? How to do that ?

Thank your very much !

Hai
Jul 21 '05 #1
2 6581
> 2. If you want to do the same from C#, you will make the
same calls, just in slightly different form. There are plenty of
application notes on using COM objects from C#, so this is
not the place to explain that.


However, this could be right place to give some concrete references:

Microsoft provides the complete documentation of the Visio API. Have a look
here:
http://www.msdn.microsoft.com/library/
Inside the menu tree, go to
- Office Solutions Development
- Microsoft Office 2003 (or XP)
- Visio 2003 (or 2002)
- SDK Documentation
Somewhere below you will find the Automation Reference with a description of
the complete programming interface of Visio.

Example: The method "OpenEx" opens an existing Visio file.

Most examples are provided in VBA, but it should not be too difficult to
translate them to C#.

Best regards,
Markus
Jul 21 '05 #2
"Hai Ly Hoang" <No*****@Mail.c om> wrote in message
news:el******** *****@TK2MSFTNG P10.phx.gbl...
Hi, Hello.
I want to open a visio drawing file (.vsd) from hardisk and get the list of
all shape in that file ? How to do that ?
Break this problem into two pieces.

1. Do what you want using COM. Visio can be exquisitely
controlled via its object model, exposed as COM interfaces.
You can use VBScript or JScript (EcmaScript?) to do so,
with a steady eye on the help for Visio's VBA programmers.

2. If you want to do the same from C#, you will make the
same calls, just in slightly different form. There are plenty of
application notes on using COM objects from C#, so this is
not the place to explain that.
Thank your very much ! You're welcome.
Hai

--
--Larry Brasfield
email: do************* **********@hotm ail.com
Above views may belong only to me.
Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1422
by: Lee Newson | last post by:
Hi, I have a Windows Application that utilises the Visio Drawing Control. I have written this app in VB.NET. When i dropped the control onto a form the file AxInterop.VisOcx.dll was created. When i try to deploy this app to a machine which has the .NET Framework redistributable package installed it falls over with an error saying that it cannot find the file. If i deploy it to a diiferent machine with VS.NET fully installed it works....
1
2387
by: Hai Ly Hoang | last post by:
Hi, I want to open a visio drawing file (.vsd) from hardisk and get the list of all shape in that file ? How to do that ? Thank your very much ! Hai
0
1568
by: anonymous | last post by:
Hi all, I am using Visio drawing control (Visio automation object model) in my asp.net web page. I have a code which creates a DrawingControlClass object in my server code Microsoft.Office.Interop.VisOcx.DrawingControlClass dr=new Microsoft.Office.Interop.VisOcx.DrawingControlClass( ); i am using the drawing control to get access to the Application object so i am creating it only on the server.
4
3017
by: jes | last post by:
hi, i have an open & delete btn. onclick of open as visio drawing opens in visio & onclick of delete the drawing gets deleted from the filesystem. The problem is i am unable to perform these actions if the file is already opened in another instance of visio. how do i check if it's already opened and then throw an error msg? thanks
1
1356
by: Ashley Bryant | last post by:
I have a web application built in ASP 3.0 that uses data from SQL Server 2000 to generate Visio 2002 drawings, save the drawings to a file on the webserver and then send that file to the browser. We've successfully installed and ran the application with Windows 2000 server, Windows Server 2003 (Web Edition and Enterprise), Windows 2000 Professional, and Windows XP and with SQL Server 7 and 2000. Now we've attempted another installation...
0
1084
by: bsautner | last post by:
Trying very hard to develop an "activex" - i.e com visible control for use inside a visio drawing. Using VS 2005 Team Suite and i can create a windows user control that can be added to a windows form and even an MS Access Form but when i try to add it to a visio drawing using "insert - Control" menu i get: An Error (1442) occured during the action Insert Control. Visio cannon insert this control because its TypeInfo did not merge...
0
1123
by: gkelly | last post by:
I looked a looked for an answer to this question and I have not been able to find anything. ------------------------------------------------------------------- using MSVisio = Microsoft.Office.Interop.Visio; using MSVisOcx = Microsoft.Office.Interop.VisOcx; MSVisOcx.DrawingControl v_dc = new MSVisOcx.DrawingControlClass(); MSVisio.Application v_app = v_dc.Document.Application; MSVisio.Document v_doc = v_app.Documents.OpenEx(...
14
5931
by: joemo2003 | last post by:
I created a button in excel sheet, and that button need to browse and open a visio drawing. I try two ways to do it, but either way work. can anyone help? First way: Private Sub CommandButton1_Click() Dim objVisio As Visio.Application Set objVisio = New Visio.Application objVisio.Visible = True Dim vFile As Variant vFile = objVisio.Documents.Open("All Visio Files (*.vs*; *.v?x)")
2
2016
by: poonamsharma | last post by:
Hi, I want to open a already exist visio drawing through VB language. I create a form inside Microsoft Access and put a command button over it .I want that while clicking on it ,it opens the visio page.
0
9720
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9599
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10112
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6879
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4330
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3854
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.