Reference to another shape

Started by RhesusMinus, February 02, 2011, 11:16:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RhesusMinus

Hi.



I'm trying to reach some shape datas (Prop.PartNo). And.. I'm able to get this from some of the shapes, in the sahpe sheet, using "=GETREF(Sheet.8!Prop.PartNo)"

However.. if I try to get something from "TheShape" og "Dings", it won't "connect" to them, hence I can't get the shape data.
If I rename "TheShape" to "Sheet.78", I suddenly can access it.

So.. my question is.. must the shapes have a name in this Sheet.Number format?

THL

Jumpy

Maybe it is the Name vs. NameU issue again, that occurs by multiple renaming of a shape?

You should rename the shape again to TheShapeTest and you'll see, that in the ShapeSheet you can still only reference it with Sheet.78.

RhesusMinus

Hi Jumpy.

If I renamed the shape a couple of times, I managed to get different values for the Name and NameU properties. However... both Name & NameU are the same now, but I still can't reference those cells without renaming them to "Sheet.ID" :(

THL

RhesusMinus

See attached drawing.

In the MyGroup shape, I've got an User-defined cell "User.FromOption0" were I want the Prop.PartNo from shape Option0 to appear.
However... "=GETREF(Option0!Prop.PartNo)" only tells me that there is an error in the formula :(


Jumpy

#4
OK. If a named shape is standalone you can reference it with its name in another shapes ShapeSheet.
But if a shape is inside a group, that is no longer possible.

The reason may be, that a shapename has to be unique on a page and has to be unique inside a group. So you can have one (standalone) shape on the page named Option0 and can reach it with the reference and you can have a second shape named Option0, but inside the group, and that you can't reach with that referenece. I think it is to avoid confusion.

The Sheet.123 notation works everytime because it is unique for the page (or even the document?).


It may be that there is sth. like =MyGroup![Shapes]Option0!Prop.PartNo but I haven't found the right combination, if there is any.

Jumpy


Edit:
Seems I#m wrong and there's nothing like that: Look here:

http://msdn.microsoft.com/en-us/library/ms195648(v=office.12).aspx

RhesusMinus

Thanks for all your time Jumpy.

I just found out that Sheet.ID actually works! I just use the "Shape Name" dialog to get the unique ID of the Option0 shape.

So.. Sheet.ID is not the NAME of the shape, but a pointer to the shape in this sheet, with this specific ID.

I'd never find this out without your link in the previous mail. So.. thank you again for your time!

THL