If there are a fixed number of TextBlocks in the node, perhaps it would be easiest if you assigned a name to each one that you might need to find at runtime. Then you can call Panel.findObject on the Node with the desired name string.
If there are a variable number of TextBlocks, you will first need to find the specific Panel that contains the TextBlock that you care about. There are several Panel methods that might be used to find the desired panel.
If it returns a TextBlock, as it should if the name is unique, then you can call GraphObject.findDocumentPoint on it to get the document coordinates for some spot in that textblock. (go.Spot.Center is commonly used.)
You can then call Diagram.transformDocToView to change the Point into viewport coordinates. I suppose then you’ll want to convert viewport coordinates (i.e. x,y within the diagram’s HTML DIV element) into screen coordinates.
thanks,
I have reference to the textblock I have a unique name for it.
the text block is inside a panel, so simulate clicking on the panel is also good for me.
I was looking for findDocumentPoint but could not find it.