cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Computed MetaAttribute Macro : Trying to get HexaId

RGenin
Trusted Contributor

Hello everyone, 

 

I'm trying to get the Hexadecimal ID of a Diagram insterad of its Absolute ID in a reportset, but my macro fails everytime:

image.png

Sub GetAttributeValue(Object as MegaObject,AttributeID as Variant,Value as String)

Dim oToolkit 
Set oToolkit = Object.Toolkit

Value = oToolkit.GetStringFromID(Object)

End sub

I believe the macro looks a little bit too simple...

 

Any clue ?

 

Thanls. 

Raphaël.

5 Replies

Hello Raphael,

 

I see you have opened case 00085201 regarding this scenario.

I will reply to you directly through the case mechanism to assist. 

 

Thanks,

David Ingalls

MEGA Technical Support 

RGenin
Trusted Contributor

Opened case  000085201

RGenin
Trusted Contributor

Tried for hours....Still no result.

Documentation is very scarse unfortunately.

 

Latest result:

Sub GetAttributeValue(Object as MegaObject,AttributeID as Variant,Value as String)
root= Object.getRoot()
Value = root.getObjectfromID(Object).getProp("~H20000000550[_HexaIdAbs]")
End Sub

image.png

 

How can the parent would be an empty object where there is data ?

RGenin
Trusted Contributor

Hi, 

 

Thanks for the reply.

No, it does not work.

 

We have some value using:

Sub GetAttributeValue(Object as MegaObject,AttributeID as Variant,Value as String)

Dim mgRoot
Set mgRoot = Object.getRoot
Dim mgToolkit
Set mgToolkit = mgRoot.Currentenvironment.Toolkit

Value = Object.getid
'Value = mgToolkit.GetStringFromID(Object.getid)

End Sub

However, the id from Object.getid or the hexa from mgToolkit.GetStringFromID(Object.getid) don't provide the right results (the id changes everytime the report is refreshed).

 

I don't know why somehow it is a temporary id or something.

hsoegaard
MEGA Partner
MEGA Partner

Hi,

 

Have you tried to use the .GetProp("_HexaidAbs") ?