counting items with visio / vba

Hi !

I'm currently developing VBA from access to generate a Visio doc.

All is pretty well, but sometimes, I guess when I use grouped elements
(masters for example) there is a lot of crap
I need to keep an eye on each drop element (masters, lines ...)

If I drop a complex master made from grouped lines and then use
document_visio.pages(1).shapes.count

I'm going to have: 1

When I drop a line, or a master or anything else, and I want to modify it, I
need to have its number, in order to call it like that
Doc.Pages(p).Shapes.ItemFromID(21).CellSRC(....)

and this 21 is very different from the 1 I can have with the shapes.count
function.

I guess there is a different solution to resize master, color lines ...
but my application is pretty big and I don't want to rewrite all the code

Does anybony know the way to get the real number of items on a page ?
If you do, thank you, that'll be a great help :-)

Eric



0
emonchan (1)
5/17/2004 11:25:45 PM
visio 3638 articles. 1 followers. Follow

1 Replies
819 Views

Similar Articles

[PageSpeed] 39

I guess the "real number" of things on a page is debatable in a philosophic
sense. If I drop a computer monitor shape on the page, that is "one thing".
I don't care about the rectangles inside the shape that make the monitor
look realistic. But it looks like you are approaching the drawing from CAD
perspective. So here are a few notes:

Groups can contain sub-shapes. To get at sub-shapes, you can look at the
shp.Shapes collection for any shape variable, shp. shp.Type can help tell
you if a shape is a group, but it's often easier to just ask for
shp.Shapes.Count.

Shape geometry can also be combined. This is a way to put arcs and lines
together in a shape without grouping. It's a more "flat" structure. Instead
of separate sub-shapes, you'll have separate geometry sections in the
ShapeSheet of a single shape. Look at the shp.GeometryCount property of a
shape.

There are more tips and tricks here:

Visio development info:
-----------------------------------------
http://msdn.microsoft.com/office/understanding/visio/
http://www.mvps.org/visio/VBA.htm

-- 

Hope this helps,

Chris Roth
Visio MVP


"eric" <emonchan@univ-lyon1.fr> wrote in message
news:40a949d4$0$3318$626a14ce@news.free.fr...
> Hi !
>
> I'm currently developing VBA from access to generate a Visio doc.
>
> All is pretty well, but sometimes, I guess when I use grouped elements
> (masters for example) there is a lot of crap
> I need to keep an eye on each drop element (masters, lines ...)
>
> If I drop a complex master made from grouped lines and then use
> document_visio.pages(1).shapes.count
>
> I'm going to have: 1
>
> When I drop a line, or a master or anything else, and I want to modify it,
I
> need to have its number, in order to call it like that
> Doc.Pages(p).Shapes.ItemFromID(21).CellSRC(....)
>
> and this 21 is very different from the 1 I can have with the shapes.count
> function.
>
> I guess there is a different solution to resize master, color lines ...
> but my application is pretty big and I don't want to rewrite all the code
>
> Does anybony know the way to get the real number of items on a page ?
> If you do, thank you, that'll be a great help :-)
>
> Eric
>
>
>


0
visioguy8694 (102)
5/18/2004 7:38:19 AM
Reply:

Similar Artilces:

Modify Item Screen
When we use the look up item screen we need for this screen to show supplier. On the screen I would like to eliminate "ITEM TYPE" and add "SUPPLIER". Is this possible to add or delete collumns to the item look up window? -- Thank you very much. Bob No, but it is possible to create an addin that replaces the Lookup Window entirely. I think there is at least one add-in out there that replaces the Lookup Window, but don't know any other details. -- Glenn Adams Tiber Creek Consulting http://www.tibercreek.com glenn@tibercreek.com ---------------------------------...

Pivot table and counting.
I have a pivot table that gives me the number of rides done by a van. I can have the pivot table return the number of rides, but what I need is the number vans that participated for a certain day. Example, it is possible to have 27 trips done by 18 vans, how can I count the number of vans and not addup the van number? Any help appreciated. Thank you, Joe Hi Joe We need a bit more information on how your source data table is set up. What information do you have in each column? -- Regards Roger Govier sacredarms <sacredarms@discussions.microsoft.com> wrote: > I have a pi...

CListCtrl item text string length limitation
Does the CListCtrl item text string have any length limitation? The control just can't display any string longer than 219 characters in my program however I set the column width a big value. Thank for help! I thought the limit was 260 characters. I am not aware of a limitation on the length of the string, only on the length actually displayed. No explanation is given as to why there is such a limitation. However, presumably if you make it owner-draw, you could do anything you want. joe On Tue, 31 May 2005 20:30:00 +0800, "Julian" <zhuxh@30san.com> wrote: >Does ...

Sales of Items below cost
Is there a setting that would alert a cashier or prevent a cashier from selling an Item below cost? Item Properties: Pricing Tab: Lower Bound. You could use a query to set lower bound = cost Tom -- Stop fishing for e-mail "mwbritt" wrote: > Is there a setting that would alert a cashier or prevent a cashier from > selling an Item below cost? ...

VBA Action on excel #Reference! error 4?
Hello, I need to supervise a range of cells and if any of them make error #Referense! I need to run a macro. I can't use Excel GUI, it need to be in VBA. Can any of you suggest a code to handle this? /Thank you How about: Code ------------------- Sub TestRefErr() Dim r as Range Dim bErr as Boolean bErr = False For Each r in Range("A1:B10") If CStr(r.Value) = "Error 2023" Then bErr = True Exit For End If Next If bErr = True Then Call YourMacroName End Su ------------------- -- Message posted from http://www.ExcelForu...

buy newest lotro items with cheapest lotro gold
http://www.wowmmocom.com http://www.wowmmocom.com The Lord of the Rings (EU)--Belegaer - 10 $: 10.49 The Lord of the Rings (EU)--Evernight - 10 $: 10.19 The Lord of the Rings (EU)--Maiar - 10 $: 10.69 The Lord of the Rings (EU)--Snowbourn - 10 $: 18.69 The Lord of the Rings (EU)--Eldar - 10 $: 10.25 The Lord of the Rings (EU)--Gilrain - 10 $: 11.05 The Lord of the Rings (EU)--Gilrain - 10 $: 11.05 The Lord of the Rings (EU)--Vanyar - 10 $: 9.05 The Lord of the Rings (EU)--Estel - 10 $: 10.79 The Lord of the Rings (EU)--Laurelin - 10 $: 13.14 The Lord of the Rings...

Sync between Sent Items-mailbox when using OWA and Sent Items in P
Dear Sir In my office I use outlook connected to exchange server through a LAN, where I send and receive emails normally. I use Personal Folders so I find all received emails in Inbox and all sent emails in Sent Items of the personal folder. At weekend I close my outlook before I go home in order to keep all my received emails in the mail box of the server, I use Outlook Web Access (OWA) connected to the exchange server through the internet where I send and receive email normally and I find all the received emails in the Inbox and all the sent emails in the Sent Items of the...

Cycle Counting
Hello, I am looking for ideas on how to cycle count serial number tracked items without increasing workload. Our serialized items are barcoded but the problem is the are situated on the pallet incorrectly and the pallet is placed on a third level of a racking system. If we could just cycle count based on item count and not include the serial number it would make it easy. Is this possible in Great Plains. We are running Great Plains 8.0. Any suggestions are greatly aprreciated. Thank You, Brian Morris Database Administrator ...

Store Operations POS Item Table Field Suggestion
We would like to suggest adding a new "numeric" type field in the "Item" table of Store Operations. All of the customers that we have dealt with have only used numeric values in the "ItemLookupCode" field, however this field is an alphanumeric string, and does not offer true numeric sorting in applicable browsers. Not to alienate those clients that use alphanumeric characters in the ItemLookupCode field, we suggest adding several true numeric fields for custom data, then the user could sort on their numeric data. In addition to our encounters with numeri...

Change an Item Type
New to Outlook, coming from GroupWise. After addressing an item to many people, I decide to change it from an e-mail message to a Meeting Request or a Task. I can not figure out how to do this in Outlook. There was a simple Menu command to do this in GroupWise. Thanks for any insight. Pepper AFAIK, you can't convert a message to a task or meeting request. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com Outlook Tips by email: dailytips-subscribe-request@lists.outlooktips.net EMO - a we...

How do I count the # of times a value reoccurs and plot it over ti
I wish to plot a number of errors made by each users and compare it over time. I have a column of user ID's and a column of dates. I want the chart to count the number of times each user ID appears and plot against it's corresponding date. However, each time I try to do this, the chart appears wrong. Any ideas? In article <9595B2A1-8282-4AB3-8511-A6776E108164@microsoft.com>, Stephen@discussions.microsoft.com says... > I wish to plot a number of errors made by each users and compare it over > time. I have a column of user ID's and a column of dates. I want t...

include the ability to price standard items to three decimals
It would be nice to be able to discount items to three decimals. Example, 3 for 2.99= .997 each. Or 12 for $1.00= .083 each. Currently we cannot do this. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgb...

Count
Hi, I would like to know how which formula I should use to count some codes & to ignore the duplicated codes, for example in column A: Code 1234 4321 4321 1234 1234 3214 Now, I want Excel to count & the result is 3 which are: 1234-4321-3214 Yes I can use PivotTable, but I would like to use a formula because I have to deal with this every day. I appreciate your support. -- MFS22 COUNTIF will do it. =COUNTIF(Rng,Rng), where the criterion is the same as the range: e.g =COUNTIF(A3:A8,A3:A8) HTH Peter "MFS" wrote: > Hi, > I wo...

Running a macro for each item in an Autofilter list
I regularly produce a large sheet of data with about 15 fields/columns and several thousand rows on it which I currently filter by ones of the key fields (which may contain up to 50 different values) and then run a macro on each of those field selections (i.e. I manually run the same macro up to 50 times). How can I automate the filter selection so I can cycle through the macro as many times as required without any manual intervention. Thanks, I used column 1 as the key field in this shell: Option Explicit Sub testme01() Dim wks As Worksheet Dim myUniqueCells As Range Dim...

Line count
I am working with a program called Dictaphone. We use Word 2007 in this program. The line count on Dictaphone and the line count in Word 2007 are different even though the Dictaphone text is retrieved from Word 2007. Why would they be different? What is the difference between virutal line count and physical line count? ...

count number of characters in rich edit control
How can i count number of characters in rich edit control 2 If u mean controls of type Rich TextBox control, try RichControl1 RC1; CString Mes=RC.GetText(); int n=Mes.GetLength(); "Rahul" <Rahul@discussions.microsoft.com> wrote in message news:7743023C-EA83-4ACA-AB67-F1AE7279F1EB@microsoft.com... > How can i count number of characters in rich edit control 2 EM_GETTEXTLENGTHEX, WM_GETTEXTLENGTH, WM_GETTEXT, EM_STREAM* "Rahul" <Rahul@discussions.microsoft.com> wrote in message news:7743023C-EA83-4ACA-AB67-F1AE7279F1EB@microsoft.com... > How can i co...

Counting sales
I have two different datasets. Each with a common identifier. I need a formula that will reference the identifiers in both datasets and count the number of sales a particular agent made. Example. look up this identifier in the other dataset and then give me the value that is 2 columns over from the identifier in the second dataset. See if this helps: http://contextures.com/xlFunctions02.html -- Biff Microsoft Excel MVP "Dave" <Dave@discussions.microsoft.com> wrote in message news:E7245B37-033F-400E-9CEE-9822BE7CB0F5@microsoft.com... >I have two...

A folder that can contain any item type
Hi... How to obtain a folder that can store any type of outlook items? (messages + journal items); something like the "Deleted Foder" folder . Submitted using http://www.outlookforums.com Copy it. Mohamed Abdel-Monem wrote: > Hi... > > How to obtain a folder that can store any type of outlook items? > (messages + journal items); something like the "Deleted Foder" folder > > Submitted using http://www.outlookforums.com ...

Publisher 2002 imposing pastetboard items in printed doc
I am having problems with Publisher 2002 imposing items on the pastboard in the printed document even thoguh they have not been placed in the doc. The OS I am using is Windows XP SP2. The latest printer drivers (HP color laserjet 4600) and all microsoft updates have been installed. Do you have objects in the scratch area? Drag them down to the bottom or to the top. It is a bug. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Septagon" <Septagon@discussions.microsoft.com> wrote in message news:F54E6ED1-9651-47E9...

Removing all items
In RMS What is the best way to remove all item in one time? 1. go the SO Admin 2. [CTRL] + O 3. Logon to DB 4. Database | New Query 5. Delete Item But this method wil not set the Item ID to zero. "Dover" <Dover@discussions.microsoft.com> wrote in message news:05939CC0-D831-4112-95AF-9065F2848C3B@microsoft.com... > In RMS What is the best way to remove all item in one time? ...

COUNT ? need formula
Hi, I want to track the results of my teams sales performance. I record if it is a sale, no sale, cancelled etc in column M. I thought I'd be able to use the COUNT function/formula to be able to search for all the SALES in column M and place the result in a cell ( column O )but I can't work it out. Any ideas? Damian Hi! Try this: =COUNTIF(M1:M100,"sale") Biff "Diamond Jones" <kwanzaNOSPAM@optusnet.com.au> wrote in message news:43a0e897$0$17704$afc38c87@news.optusnet.com.au... > Hi, > > I want to track the results of my teams sales perf...

Counting Cells with Conditional Formatting
Is there a way to look at a row of data that is either highlighted yellow or red and to count only the data that is highlighted yellow and give me that number? None of my data is numerical....just one letter data, i.e.: "S" or "U" I just want to count how many of the cells are highlighted yellow in a specific row, if that makes more sense. Here's a UDF (Put in a Standard module) and use it in cell A1, like =CountByColor(A8:H8,6) << where 6 (at present) = Yellow = change to =CountByColor(A8:H8,3) to get the reds HTH Function CountByColor(InRa...

Count Function
I am creating a report for the number of pupils being collected at a certain collection time e.g. 14:00hr and 15:00hrs using the formula =Count([Child Last Name]) in the collection time footer However when i try to count the overall number of pupils in the footer using the same formula, 'Error' appears on screen? Thanks There are potentially a dozen footer sections in a report. Which one is giving you a problem? What is the name of the control? What is the exact formula? -- Duane Hookom Microsoft Access MVP "ELo" wrote: > I am creating a r...

select a range by cell names; vba
I'm trying to select X rows for a sort. The first and last rows have a defined name, RSTART and RLAST. They look like this in the Define Name dialog: ='MySheet'!$15:$15 .... How do you select the rows using these names. Here's the macro output of my best shot. I can't figure out how to incorporate the second name. Thank you. Sub trythis() Application.Goto Reference:="RSTART" Rows("15:59").Select '<---- Held down shift key and selected RLAST in cell address combo Range("I15").Activate ' what is ...

Important task using visio
Hi, I have a very important presentation to give and am planning to give using visio but however am new to visio environment. Thepresentation is about say the task carried by 2 companies during a project that is the 2 companies share different responsibilities during project implementation The flow is: Comany A Task 1 Comapany B Task 2 Task 3 Company A Task 4 Company B Task 5 Task 6 The flow can be analogous to a computer program flow Can anyone help me how 2 implement in visio?? Hello Raj, There's the main Visio 2007 Help and How-to page over here: http://office.microsof...