Dupicate a master shape as multiple smart shapes

Started by visio, March 27, 2023, 10:24:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

visio

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

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

Quote from: visio on March 30, 2023, 03:05:23 PMClearly not the right master to clone from
Master 64CharMaster is exist in ThisDocument?

visio

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

Quote from: visio on March 31, 2023, 02:04:38 PMwith the master being called aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa64
Funny !
Who assign these long names ?

visio

The master name is like that so the shape can be formatted  correctly on the page so it looks readible.

Surrogate

#21
Quote from: visio on March 31, 2023, 02:48:00 PMso it looks readible.

Great !
Quote from: visio on March 31, 2023, 02:04:38 PMused 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...

wapperdude

#22
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.
Visio 2019 Pro