Author Topic: Storing Shape Reference in ShapeSheet  (Read 3647 times)

0 Members and 1 Guest are viewing this topic.

DavidJT

  • Jr. Member
  • **
  • Posts: 15
Storing Shape Reference in ShapeSheet
« on: December 17, 2014, 02:37:16 PM »
I have an application where I clone shapes in a manner that changes to the original shape propagate to the clones, i.e. changing the fill color or line weight on the original also changes the same properties on the clones.  The formulas in the clones are written through a VBA routine but I am looking for something that can be done more in the shapesheet.

What I am fundamentally looking for is storing a reference to the original in each clone, maybe a User.Original field.  I know that storing a shape in a user field isn't realistic but I can store the shapes id.  What I can't seem to do is to utilize the id elsewhere in the shapesheet to serve as a reference to the original.  Am I overlooking a shapesheet function that does this?

As an example, the FillForegnd cell's formula might look like =ShapeFromID(User.Original)!FillForegnd where User.Original = "Sheet.5" or 5.

Another application that I have for this functionality is that I would like for the shapesheet Comment cell (under Miscellaneous) to contain a value stored in the shape data of a related shape.  I use little "tags" (basic circle object) in the rows of a custom table where the tag can be cloned and placed into a drawing and serves as a reference back to a table of data.  I would like the mouseover functionality of the tag to show the primary value in the table.  The text in tags is simply a one-up number corresponding to the row in the table.

Is there a shapesheet function that can convert a string that contains a shape id into a reference to the shape?

DavidJT

  • Jr. Member
  • **
  • Posts: 15
Re: Storing Shape Reference in ShapeSheet
« Reply #1 on: December 17, 2014, 02:50:42 PM »
The SHEETREF function has similar functionality to what I am seeking.  If I created two user fields:

User.1 = SHEETREF(User.2)
User.2 = "PinX"

The value of User.1 evaluates to the contents of the PinX field.  SHEETREF, in my opinion, would have been more aptly named CELLREF.

The equivalent functionality that I am seeking might look like:

User.Original = "Sheet.35" or "35"
FillForegnd = SHAPEREF(User.Original)!FillForegnd

Surrogate

  • Hero Member
  • *****
  • Posts: 1050
    • ShapeSheet™ Knowledge Base
Re: Storing Shape Reference in ShapeSheet
« Reply #2 on: December 17, 2014, 05:00:07 PM »
try use SETF function.

1. you change value in cell Prop.N
2. Formula contained in cell User.Row_4 create formula (i.e. reference) for cell User.Target
3. You get new value in cell User.Target
« Last Edit: December 17, 2014, 05:06:13 PM by Surrogate »

DavidJT

  • Jr. Member
  • **
  • Posts: 15
Re: Storing Shape Reference in ShapeSheet
« Reply #3 on: December 17, 2014, 05:32:52 PM »
Surrogate, this does work but it unfortunately forces a user.field to be created to house a SETF formula for ever reference that you need to make to target shape.  If I want to link entire sections of the shapesheet, that is potentially a large number of user fields.  I was hoping for a shapesheet function that was the equivalent to the VBA function .ItemFromID.  Thank you for the input though.

Surrogate

  • Hero Member
  • *****
  • Posts: 1050
    • ShapeSheet™ Knowledge Base
Re: Storing Shape Reference in ShapeSheet
« Reply #4 on: December 17, 2014, 06:10:09 PM »
you can change some shapesheet cells in one formula like this
Code
SETF(GetRef(LinePattern),"sheet"&Prop.n&"!LinePattern")+SETF(GetRef(LineWeight),"sheet"&Prop.n&"!LineWeight")+SETF(GetRef(FillForegnd),"sheet"&Prop.n&"!FillForegnd")

for long formulaes use formula editor
« Last Edit: December 18, 2014, 05:06:53 AM by Surrogate »

mb-ing

  • Jr. Member
  • **
  • Posts: 11
Re: Storing Shape Reference in ShapeSheet
« Reply #5 on: October 29, 2018, 05:19:25 AM »
Hello together,

are there already news on this subject?

I have a very similar case and I have already researched this topic intensively.
I want to get data from another shape. Both shapes are associated with a Connection Point. The "Callout" should Show data of the other shape :)

I am very grateful for any help from you.

Thank you in advance for your efforts.

With reagrds
MB-Ing.

Surrogate

  • Hero Member
  • *****
  • Posts: 1050
    • ShapeSheet™ Knowledge Base
Re: Storing Shape Reference in ShapeSheet
« Reply #6 on: October 29, 2018, 05:45:33 AM »
IMHO: You need use VBA, not only ShapeSheet formulas
We need more details about your issue.

mb-ing

  • Jr. Member
  • **
  • Posts: 11
Re: Storing Shape Reference in ShapeSheet
« Reply #7 on: October 29, 2018, 09:18:57 AM »
@Surrogate:

Thank you very much for your Reply.

The formula CALLOUTTARGETREF()!... helps me to solve my issue :)

My Case:
I have a shape (Shape 1) which includes a text. This text is edited by shape data.
Now I want to insert a shape (Shape 2), which is compareable to a callout.
I move the connection Point to Shape1, so Shape 2 is associated with Shape 1.
After that Shape 2 Shows the text of Shape 1.

But if I move the Connection Point of Shape 2 to another Shape, the text is changed to the new associated shape....
I can make sure, that all shapes have the same property.

For Example:
=CALLOUTTARGETREF()!Prop.Name

With reagrds
MB-Ing.