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

Poll: Dropping Predefined Shape Assemblies

Started by Visio Guy, May 19, 2008, 09:54:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Watch the video below, then, which comment best suits you? (must be logged in to vote)

I need this capability for my job/project
I might need this capability...some day
I need this for rainy weekends (because I'm a Visio Geek)
I wish I had never watched this video
I have no idea what I just watched

Visio Guy

Watch this video:



I've created a prototype of a mechanism for dropping assemblies of shapes, without having to ungroup (and sever!) a Master. The poll and video are inspired by this thread:   
[Tutorial] Auto ungroup shapes on drop


The idea is to define an "assembly shape" by simply typing in a bunch of text that names masters, and indicates text and other properties that are set when each individual shape is dropped. Here's the sample text from the shape in the video:

[Circle]
Text="Hi, I'm circle #1"
PinX=Width/2
PinY=Height/2
[Circle]
Text="Hi, I'm circle #2"
PinX=3*Width/2
PinY=Height/2
[Circle]
Text="Hi, I'm circle #3"
PinX=5*Width/2
PinY=Height/2
[Square]
Text="Hi, I'm a square!"
PinX=2
PinY=2
Angle=35deg
LineColor=RGB(255,0,0)
FillForegnd=RGB(255,120,120)

Circle and Square are masters in the document. A lot of this can be done with Data Graphics/Link Data to Shapes, but I'm not so sure if the relative positioning can be easily done, or if the need for shape assemblies is always matched with a need for Data Graphics/Link Data to Shapes.

Anyway, I'm interested to hear what you think!



For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Lars-Erik

Who knows, this might come in handy someday...
How does it work exactly? How do you insert the text?


Visio Guy

The text is simply typed on the page. Then some code parses it.

You could write code to generate the text as well, once you've defined a text format. I think XML would probably be a good idea, but I just used a fairly simple [MasterName] then line-by-line Prop=Val format, with a special case for Text.

I thought I'd throw the video up there, just to figure out how to do videos, polls, and to see if people absolutely freak out and go wild over this, or if it is just mildly interesting. Let's wait and see!
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

vojo

nice idea!!!

Since going down this route, would not it be also useful specify any connections between shapes and even setting
custom propertties for a given shape.

aka a "shape assembly line"

Visio Guy

The way it is now, custom properties are no problem. Connections would need some work...
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

visProcessEng

I share your passion for avoiding Grouping whenever possible.

I have probably taken the opposite approach in the way I address this issue, by creating multi-geometry shapes. 

For example all the circles in your example would share a common master ('multi-geometry').  By making the circles appearance dependant on Shape Data and by including control points for each circle the user can turn off each circle or reloate it on the page. 

I include data graphics (headings) to show tag numbers and other shape data. 

I have also made the master aware of it's location on the page so the geometries, shift in relationship to each other (to try to stay on the page).  I can send you an example if you like,  The master has some overhead associated with it, but given that I used tens or hundreds of each in a single document (they are Local + Remote Instrument Bubbles with Callouts, Alarm Points Control System) the overhead serves to compress the overall size of the file.

Let me know if you would like to see an example.

P.S.  I am working on a getting a file share account set up so I should be able to post examples more easily.

Steve

vojo

what would really make this a killer app is to define a connection or association between the shape being dropped (or dropped already) with another shape on the page.


shayneneal

#7
I have to be honest - I just found this site and have absolutely NO experience with VB.  I have been using Visio for a decade but never even realized what it could do until this week.  Your site is amazing.  The information is a little deep (sometimes much more than 'a little') and sometimes goes so far over my head that I couldn't see it with a telescope.

As for the video,  what could it be used for?  I may actually have a use for it but I can't tell yet.  *sigh*

I did watch another video after this one however (Badly Behaved Visio Shapes) and was super excited by what it did and would love to learn how do do it!  I have looked into taking a visio course but the only stuff I can find in my area is childish drawing that I have been doing for many years.  I did order a book in hopes of starting some self-training (http://www.amazon.com/Visio-2003-Bible-Bonnie-Biafore/dp/0764557246/ref=sr_1_7?ie=UTF8&s=books&qid=1220129655&sr=1-7) but it is not going to be a fast process.

Despite low voting, please keep the videos and polls coming.  There are some of us out here who are trying to play catch-up from more than a few laps back and you need to be patient with us.

If anyone has any suggestions on books or courses, either Visio or programming apparently, please feel free to send the suggestions.

Thank you everyone for taking your time to share,

Shayne

wapperdude

This reminds me of the "old days" in engineering when you would enter a netlist for circuit simulation by hand.   Brrrr.  Cold chills running up/down the back.

Other than that, it's quite clever.

Wapperdude
Visio 2019 Pro

AndyW

Quite impressive given its off the stencil, more so if it handled connectors. My attempt at that required a page in my diagram that has some shapes (which are groups) and connectors. Putting a selection box around the shapes then grouped them. If they were dragged off the page onto another page, then they were automatically ungrouped. Does have have an advantage that they can have their custom properties etc set and the user can create his own. The big downside is that that are not a stencil so not so convenient to drag and drop and not so easy to share/update as not a stencil. Food for thought though. keep up the good work/ideas.
Live life with an open mind

MacGyver

Would it be possible for you to post the source for the macro that parses the text?

Michelle

I need this capability *right now*!  LOL.  I just posted a question in the VBA forum on this very topic.  I had found some code to do this, but it wasn't working correctly.... Can you please let me in on the secret??? Pretty please? 

Michelle

vojo

vote:   Might need it someday

Perhaps I am missing something, but what is the difference between this and a group drop?

Visio Guy

#13
With a group drop, you

1. Effectively sever master instances from their masters, so the assembly will get out-of-date if you update the masters
2. A group-drop needs to be ungrouped, which results in an alert message that is scary for novice users.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Noisy Cricket

Ok! I might have use for this, right now.

We've got several projects with a core team and several operational phases which require temporary "extensions" of these project teams. The extensions (sub teams) themselves are in turn pretty much standard. Instead of creating multiple "standard" organization charts, we're thinking of creating these subteams and storing them in stencils to be deployed only when needed.

Now, to no-one's surprise, these assemblies "fall apart" when dropped on the page and lose their ability to "connect" to an existing organization chart. Visio reports that "organization chart shapes cannot be members of a group shape"......

I think this ties into the main subject so the question is: how can "teams" be stored in a stencil and be dropped on a page and keep their individual org chart functionality?


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: 480 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1345KB.
Tokens: post-login.
Cache hits: 15: 0.00352s for 26,729 bytes (show)
Cache misses: 5: (show)
Queries used: 20.

[Show Queries]