Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: bruceam on June 01, 2018, 02:25:05 PM

Title: How Do I Encapsulate Shapesheet Code with a Particular Shape Data Set in 2010?
Post by: bruceam on June 01, 2018, 02:25:05 PM
I have created a "Shape Data Set" that contains the input data fields, and the applicable formatting, for [the shape(s) I choose to apply this shape data set to].  I have discovered that, at least so far, the shape data set does also included the shapesheet code that makes use of this input data. 

Is there a way of encapsulating Shapesheet code with the input data data in a "Shape Data Set"?



Thank you for your time and assistance.

bruceam
Title: Re: How Do I Encapsulate Shapesheet Code with a Particular Shape Data Set in 2010?
Post by: Yacine on June 02, 2018, 12:40:18 PM
What are you trying to accomplish?
Do you use custom formulas in your data?
Title: Re: How Do I Encapsulate Shapesheet Code with a Particular Shape Data Set in 2010?
Post by: bruceam on June 04, 2018, 01:02:33 PM
My goal is for the selected shape to "Inherit" some or all of the the characteristics (shapesheet custom formulas) that use the data defined in the Shape Data Sets.  Think Object Oriented Programming.  An object "Inherits" the characteristics of it's ancestral objects.  In this Visio case, think of a Shape Data Set that has input values for Red, Green, and Blue, these values would then be used to set the foreground, background, or text color of the object to which this Shape Data Set was applied.  This was just an example of the effect I am attempting to achieve, not necessarily the actual application I am thinking about building in Visio.  This question is much more generic than one specific application.  I suspect I will begin to use this capability (if it exists) in many future developments.

Thank you

bruceam
Title: Re: How Do I Encapsulate Shapesheet Code with a Particular Shape Data Set in 2010?
Post by: bruceam on June 11, 2018, 07:06:24 PM
Could this "Functional Inheritance" be accomplished in Visio 2013 or Visio 2016?
Title: Re: How Do I Encapsulate Shapesheet Code with a Particular Shape Data Set in 2010?
Post by: Yacine on June 11, 2018, 08:04:48 PM
I'm not sure whether data sets would be the best option for an OOP inheritance.But shapes (actually masters) are very good objects. They carry both data and methods.Only the inheritance aspect may be complicated to implement.Anyway, I'd rather go for VBA than for a limited feature like datasets.
Could groups be an option? ie injecting data and behaviour by adding certain sub-shapes to a main shape???
More specific explanations, would help helping you ;) .