News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Macro recording fail

Started by AndrewJ, July 05, 2013, 03:36:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AndrewJ

Hello!

I am trying to record a Macro in order to extract a code for creating a new data graphic (I want to automate the creation of little orange circles on top of process boxes in order for them to display process numbers).
However, when I start recording the macro, the data graphic options get greyed out.

1: What can I do to get around this?
2: How can I figure out the code to do this if I can't record a macro and then analyze the results? (I have already checked the SDK and couldn't find this)
3: Why is this happening? It's ridiculous!

Thanks in advance!
Andrew

AndrewJ

Just to give you guys an idea, this is what I am trying to record in a macro and avoid having to get the employees to do manually every single time they want to number a process box, especially since boxes might be added after the initial numbering is done.
My instructions were as follows...

1: CTRL click all processes that will be numbered
2: DATA tab > Data Graphics > Create New Data Graphic > New Item...
3: In the New Item window, select:
   Data Field: More Fields > Shape Data > Process Number (then click OK)
   Displayed as: Text
   Style: Circle callout
   Value Format: @+   
   Value Length: 10
4: Click OK
5: Under Default position, select:
   Horizontal: Left Edge
   Vertical: Top Edge
6: Click OK
7: Click "Yes" to apply this data graphic to selected shapes
Andrew


AndrewJ

Thank you,

But is there any help anyone is willing to offer me for this short of having to purchase and read an entire book?
Any help would be much appreciated, either in figuring out how to get Visio to stop greying out what I'm trying to record through a macro, by telling me how I can extract this code otherwise or by telling me what code to use if you could be that generous.

By the way, I am using Visio 2013.
Andrew

aledlund

You might start here ( the assumption is that you already have the visio sdk)

http://msdn.microsoft.com/en-us/library/office/ff766215.aspx

al

AndrewJ

Thank you.
But from what I am reading, it means that I have to already have created a data graphic?
That defeats the purpose of what I am trying to accomplish since you can simply select all shapes and chose the data graphic and it's done.
What I am trying to accomplish programmatically is creating that data graphic programmatically and integrating that code into a macro.
Can that be done?
Andrew

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 231 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1071KB.
Tokens: post-login.
Cache hits: 13: 0.00139s for 26,764 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]