Test/know if sub segment exist
Simon Phung
Instructions
HPS::SegmentKey key1, key2, key3, key4;
HPS::SegmentKey modelKey = GetCanvas().GetFrontView().GetAttachedModel().GetSegmentKey();
key1 = modelKey.Subsegment("HOOPS1", false);
if (key1.Type() == HPS::Type::None)
dprintf("key1 returned Type:None\n");
key2 = modelKey.Down("HOOPS2");
if (key2.Type() == HPS::Type::None)
dprintf("key2 returned Type:None\n");
modelKey.Subsegment("HOOPS3"); // create segment
key3 = modelKey.Subsegment("HOOPS3",false);
if (key3.Type() == HPS::Type::SegmentKey)
dprintf("key3 return Type:SegmentKey");
modelKey.Subsegment("HOOPS4"); // create segment
key4 = modelKey.Down("HOOPS4");
if (key4.Type() == HPS::Type::SegmentKey)
dprintf("key4 return Type:SegmentKey");
Related articles
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
{"serverDuration": 34, "requestCorrelationId": "87dcd2ff49d14fec91b8caae2461361f"}