/
Test/know if sub segment exist

Test/know if sub segment exist

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

Related content

How-To: Get the Net Bounding of a Segment
How-To: Get the Net Bounding of a Segment
More like this
How-To: Display HOOPS Visualize call stack when debugging in Visual Studio
How-To: Display HOOPS Visualize call stack when debugging in Visual Studio
Read with this
How-To: Using the HOOPS 3D Part Viewer
How-To: Using the HOOPS 3D Part Viewer
More like this
FAQ: HPS Anti-Aliasing
FAQ: HPS Anti-Aliasing
Read with this
How-to: Display CAD model in multiple views
How-to: Display CAD model in multiple views
More like this
HOOPS Visualize HPS Public Roadmap
HOOPS Visualize HPS Public Roadmap
Read with this