How to initialise TypedMemberElement for DimensionMember?

I am able to create DimensionMember with ExplicitMember using the following code:

Concept conceptDimension = schema.GetConceptByName(dimension);
Concept conceptExplicitMember = schema.GetConceptByName(explicitMember);
DimensionMember dimensionMember = new DimensionMember(conceptDimension, conceptExplicitMember);
ContextSenario contextScenario = new ContextSenario();
contextScenario.DimensionMemberList.Add(dimensionMember);
Context context = new Context(period, entity);
context.Scenario = contextScenario;

But I am not able to create one with TypedMemberElement. The following is what I am trying to genereate:

<xbrli:context id="fromto_20210808_20210809_AddressOfResidenceOfDirectorsMember_0001">
        <xbrli:entity>
          <xbrli:identifier scheme="https://www.ssm.com.my/">1234567-X</xbrli:identifier>
        </xbrli:entity>
        <xbrli:period>
          <xbrli:startDate>2021-08-08</xbrli:startDate>
          <xbrli:endDate>2021-08-09</xbrli:endDate>
        </xbrli:period>
        <xbrli:scenario>
          <xbrldi:explicitMember dimension="ssmt:ParticularsOfCompanyAxis">ssmt:AddressOfResidenceOfDirectorsMember</xbrldi:explicitMember>
          <xbrldi:typedMember dimension="ssmt:DirectorCountAxis">
            <ssmt:DirectorCount>0001</ssmt:DirectorCount>
          </xbrldi:typedMember>
        </xbrli:scenario>
      </xbrli:context>

Is there any sample codes on how to achieve the above? Thanks in advance.

@wallace.o,
We have noted your request and working over it. You will be notified here once any update is ready for sharing.

This requirement is logged as:
FINANCENET-87 - Sample code required to initialize TypedMemberElement for DimensionMember

The issues you have found earlier (filed as FINANCENET-87) have been fixed in this update. This message was posted using Bugs notification tool by WilliamShen

Hi, may I know where can I refer to the sample code?

@wallace.o,
We are arranging the sample code and will share it soon.

@wallace.o
You can try the following code :
InlineXbrlDocument document = new InlineXbrlDocument(“test.html”);
List contexts = document.Contexts;
List SceExpNames = new List();
List SceTypeNames = new List();
foreach (Context con in contexts)
{
ContextSenario ce = con.Scenario;
if (ce != null)
{
foreach (DimensionMember dm in ce.DimensionMemberList)
{
if (dm != null)
{
if (dm.ExplicitMemberConcept != null)
{
SceExpNames.Add(dm.ExplicitMemberConcept.Name);
}
if (dm.TypedMemberElement != null)
{
SceTypeNames.Add(dm.TypedMemberElement.TextContent);
}
}
}
}

Hi, I’m trying to use the Aspose.Finance to generate XBRL document programmatically, and I am able to generate everything I needed except for context scenario with TypedMember.

I can generate this
xbrli:scenario
<xbrldi:explicitMember dimension=“ssmt:ParticularsOfCompanyAxis”>ssmt:AddressOfResidenceOfDirectorsMember</xbrldi:explicitMember>
</xbrli:scenario>

but I am not able to generate this
xbrli:scenario
<xbrldi:explicitMember dimension=“ssmt:ParticularsOfCompanyAxis”>ssmt:AddressOfResidenceOfDirectorsMember</xbrldi:explicitMember>
<xbrldi:typedMember dimension=“ssmt:DirectorCountAxis”>
ssmt:DirectorCount0001</ssmt:DirectorCount>
</xbrldi:typedMember>
</xbrli:scenario>

I see the constructor accepting the typeElement parameter, but I am not able to initialize it.
image.png (7.7 KB)

@wallace.o,

We will provide updated code (if possible) for your reference. We will get back to you soon.

@wallace.o Can you upload the file so that we can better solve the problem ?

Hi, please refer to attached file. In particular, I am able to generate everything except for this part:

		<xbrldi:typedMember dimension="ssmt:DirectorCountAxis">
			<ssmt:DirectorCount>0001</ssmt:DirectorCount>
		</xbrldi:typedMember>

sample.zip (3.7 KB)

@wallace.o,

Thanks for the file. We will check it and get back to you soon.