Author Topic: Dupicate a master shape as multiple smart shapes  (Read 2138 times)

0 Members and 1 Guest are viewing this topic.

visio

  • Jr. Member
  • **
  • Posts: 47
Re: Dupicate a master shape as multiple smart shapes
« Reply #15 on: March 29, 2023, 08:40:53 AM »
Thank you will try the code.

As for placement that would be for initial placement as the actual placement of the shapes changes every time the data is updated. the page has time attributes associated with it so each shape is placed on the page relative to its start time. The smart shape then draws itself (makes its height bigger or smaller) based on elapsed time. That way it is easy to see long running processes at a glance.


visio

  • Jr. Member
  • **
  • Posts: 47
Re: Dupicate a master shape as multiple smart shapes
« Reply #16 on: March 30, 2023, 10:05:23 AM »
trying to modify the script to use the master set up for this called 64CharMaster but getting error  'object name not found'. Clearly not the right master to clone from. What is the obvious mistake I am making


'    Set mShp = Documents.Item("DropMany.vsdm").Masters.ItemU("Square")
Set mShp = ThisDocument.Masters.ItemU("64CharMaster")

Surrogate

  • Hero Member
  • *****
  • Posts: 1803
    • ShapeSheet™ Knowledge Base
Re: Dupicate a master shape as multiple smart shapes
« Reply #17 on: March 30, 2023, 10:21:18 AM »
Clearly not the right master to clone from
Master 64CharMaster is exist in ThisDocument?

visio

  • Jr. Member
  • **
  • Posts: 47
Re: Dupicate a master shape as multiple smart shapes
« Reply #18 on: March 31, 2023, 09:04:38 AM »
I recorded another macro which was just a manual drag and dropof the master onto the page and then used it to target the real master name =   Set mShp = Documents.Item("Trilogy.vss").Masters.ItemU("64_Char_Uproc")

Multiple shapes created, only issue is the name of the shapes which is prefixing the new name onto the current name of the master i.e. Name_26aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa64 with the master being called aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa64

Also is it possible to use a test file as a driver file for the copy? So if there is a file with a list of shape names the something lie a for loop with a read at the top might do?

Surrogate

  • Hero Member
  • *****
  • Posts: 1803
    • ShapeSheet™ Knowledge Base
Re: Dupicate a master shape as multiple smart shapes
« Reply #19 on: March 31, 2023, 09:36:42 AM »
with the master being called aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa64
Funny !
Who assign these long names ?

visio

  • Jr. Member
  • **
  • Posts: 47
Re: Dupicate a master shape as multiple smart shapes
« Reply #20 on: March 31, 2023, 09:48:00 AM »
The master name is like that so the shape can be formatted  correctly on the page so it looks readible.

Surrogate

  • Hero Member
  • *****
  • Posts: 1803
    • ShapeSheet™ Knowledge Base
Re: Dupicate a master shape as multiple smart shapes
« Reply #21 on: March 31, 2023, 10:29:49 AM »
so it looks readible.

Great !
used it to target the real master name =   Set mShp = Documents.Item("Trilogy.vss").Masters.ItemU("64_Char_Uproc")
Sorry! It is so complex for me…
« Last Edit: March 31, 2023, 10:54:18 AM by Surrogate »

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4837
  • Ideas Visio-lized into solutions
Re: Dupicate a master shape as multiple smart shapes
« Reply #22 on: March 31, 2023, 12:06:20 PM »
I agree with Surrogate!

Are these long names being used for growing the width of the shape to accommodate the displayed text?

Check out the following shapesheet functions, which would be used in Text Transform section:  Textwidth, Textheight.  Then set shape width = txtwidth. This would alleviate need for tediously long names.   Forum search ought to provide additional examples.
« Last Edit: March 31, 2023, 09:56:59 PM by wapperdude »
Visio 2019 Pro