cancel
Showing results for 
Search instead for 
Did you mean: 

Computed MetaAttribute Macro : Trying to get HexaId

Contributor

Computed MetaAttribute Macro : Trying to get HexaId

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
MEGA Partner

Re: Computed MetaAttribute Macro : Trying to get HexaId

Hi,

 

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

 

 

Contributor

Re: Computed MetaAttribute Macro : Trying to get HexaId

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.

Contributor

Re: Computed MetaAttribute Macro : Trying to get HexaId

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 ?

Contributor

Re: Computed MetaAttribute Macro : Trying to get HexaId

Opened case  000085201

MEGA

Re: Computed MetaAttribute Macro : Trying to get HexaId

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