Author Topic: How Do I Encapsulate Shapesheet Code with a Particular Shape Data Set in 2010?  (Read 262 times)

0 Members and 1 Guest are viewing this topic.

bruceam

  • Jr. Member
  • **
  • Posts: 14
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

Yacine

  • Hero Member
  • *****
  • Posts: 2410
What are you trying to accomplish?
Do you use custom formulas in your data?
Yacine

bruceam

  • Jr. Member
  • **
  • Posts: 14
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

bruceam

  • Jr. Member
  • **
  • Posts: 14
Could this "Functional Inheritance" be accomplished in Visio 2013 or Visio 2016?

Yacine

  • Hero Member
  • *****
  • Posts: 2410
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 ;) .
Yacine