News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Storing Shape Reference in ShapeSheet

Started by DavidJT, December 17, 2014, 07:37:16 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

DavidJT

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

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

#2
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

DavidJT

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

#4
you can change some shapesheet cells in one formula like this
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

mb-ing

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

IMHO: You need use VBA, not only ShapeSheet formulas
We need more details about your issue.

mb-ing

@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.

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 289 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1129KB.
Tokens: post-login.
Cache hits: 13: 0.00170s for 26,732 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]