Author Topic: Custom background shapes  (Read 8339 times)

0 Members and 1 Guest are viewing this topic.

Fighbird

  • Newbie
  • *
  • Posts: 5
Custom background shapes
« on: December 01, 2008, 06:14:17 AM »
Hi there - long-time reader, first time poster. :)

I really want to create my own background shapes, and I really want them to behave like the shapes in the Backgrounds stencil by automatically being created on the vBackground pane and auto-adjusting in size to the document's dimentions.

Now, I've been fiddling a bit with setting the ShapeSheet options on some shapes to get them to behave like I want them to (right-clicking on a Shape in a Stencil and selecting Edit Master -> Edit master Shape), selecting the shape and then activating the Show ShapeSheet table. Just mentioning all of this in case I am accessing the data wrong... :)

Now, the elements under Shape Transform all work for me (automatic resizing etc.), the only issue left being regarding Events. Even though I use RUNADDON("Make Background")+SETF("EventDrop",0) under EventDrop, the vBackground pane is not generated upon release of the shape onto the drawing area. Instead it behaves like a standard Shape, and places itself on top of what is already present on the drawing area.

Am I missing some vital setting somewhere? I am running Visio 2007 Pro (12.0.6300.5000) SP1 MSO (12.0.6320.5000) on Vista SP1.

Thanks in advance!  8)

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3833
  • Ideas Visio-lized into solutions
Re: Custom background shapes
« Reply #1 on: December 03, 2008, 06:38:51 PM »
Looks like you did everything necessary.  You did close the edit master icon window which updates the shape on the stencil?

When you drag and drop the shape, the runnaddon should create a new page, Vbackground.  If that didn't happen, either you have a typo possibly, or didn't update the stencil shape.  You can verify by clicking the shape you dropped and look at its shapesheet.  All the formulas should be present.

HTH
Wapperdude
Visio 2019 Pro

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3833
  • Ideas Visio-lized into solutions
Re: Custom background shapes
« Reply #2 on: December 03, 2008, 06:41:15 PM »
Oops.  Meant Edit Master Shape window, not icon.   :P
Visio 2019 Pro

Fighbird

  • Newbie
  • *
  • Posts: 5
Re: Custom background shapes
« Reply #3 on: December 04, 2008, 02:46:18 AM »
Thanks for the reply! :)

Formula is present all the way through, and I even compared everything with one of the build-in Background shapes without finding any discrepancies...

I think it's weird that the out-of-the-box Backgrounds work like charms, but my own custom attempt don't - either there is something fundamental I'm missing (I'm beginning to doubt that), something is conflicting in my installation (could be - this *is* Microsoft after all...  :D ) or there are issues with my access rights somewhere (seems doubtful).

This Addon-thingie that I'm calling - is that something that needs to be "activated" or is there somewhere I can check that it is loaded after I start Visio?

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1718
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Custom background shapes
« Reply #4 on: December 04, 2008, 03:01:36 AM »
Hi Fighbird,

Are you updating a master in an external stencil (.vss), then dropping in to a document that has an old (and flawed) version of your master?

Check the Document Stencil of your target document, and delete any old background masters from it. You'll find it under File > Shapes > Show Document Stencil.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Fighbird

  • Newbie
  • *
  • Posts: 5
Re: Custom background shapes
« Reply #5 on: December 04, 2008, 03:30:52 AM »
Hi Fighbird,

Are you updating a master in an external stencil (.vss), then dropping in to a document that has an old (and flawed) version of your master?


Does not appear so, no.  :(

I have been using a danish version, maybe I should try a US/UK version?

Fighbird

  • Newbie
  • *
  • Posts: 5
Re: Custom background shapes
« Reply #6 on: December 04, 2008, 03:41:50 AM »
This is the ShapeSheet for my custom Background shape. I've left out the 3 rows on Character, Paragraph and Tabs in the screendumps, as I figure they don't have any bearing on the outcome at all anyway.




« Last Edit: December 04, 2008, 03:43:47 AM by Fighbird »

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1718
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Custom background shapes
« Reply #7 on: December 04, 2008, 04:52:47 AM »
Hmm. I checked the localized and universal names for the "Make Background" add-on. They are the same.

Sometimes the universal name is more cryptic, like "MBKGND", but not in this case.

I would suggest just modifying an existing background shape. Copy a master that works, then stuff your own artwork into the group.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Fighbird

  • Newbie
  • *
  • Posts: 5
Re: Custom background shapes
« Reply #8 on: December 04, 2008, 05:39:38 AM »
Thanks for the help! :)

Have been trying that a bit, but am having trouble getting the additional shapes I add to behave properly. All that is needed is to group them with the "original" background shape, correct? That could be the culprit for my failed attempts previously, as the background I have edited now and added a shape to now acts like a regular shape; when I view the Shapesheet, I get either the background shape with the correct behaviour (with the add-on embedded) or the added shape's Shapesheet, which doesn't...

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2955
    • Paul Herber's website
Re: Custom background shapes
« Reply #9 on: December 04, 2008, 06:10:57 AM »
Have you checked the User-defined cells that a background shape uses? And is the ObjType cell appropriate?
Also, check the values in the background shape's PageSheet shapesheet.

Electronic and Electrical engineering, business and software stencils and applications for Visio -

https://www.paulherber.co.uk/

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1718
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Custom background shapes
« Reply #10 on: December 04, 2008, 07:29:02 AM »
Not group with the original shape, no, not quite.

You need to: 1. Open the original master, 2. Open the group inside of that master, then 3. Paste your junk inside of that group.

If you make your stuff expand to fill the whole group, it should then stretch with the group for different page sizes and orientations.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3833
  • Ideas Visio-lized into solutions
Re: Custom background shapes
« Reply #11 on: December 04, 2008, 10:52:10 AM »
One observation, in the shape xform section, PinX must have the formula:  Guard(Width*0.5).  PinY needs to have Guard(Height*0.5).  Otherwise the location becomes really weird and the sizing doesn't seem to work quite right.
Visio 2019 Pro