v5.0
カンマ区切りのリスト形式で X3DObjectCollection の文字列を戻します。
String X3DObjectCollection.GetAsText(); |
oString = X3DObjectCollection.GetAsText(); |
# # This example logs all children under the scene root # from win32com.client import constants as c Application.NewScene( "", 0 ) root = Application.ActiveSceneRoot # Set the scene up root.AddGeometry( "Cone", "NurbsSurface" ) root.AddGeometry( "Torus", "MeshSurface" ) root.AddGeometry( "Disc", "MeshSurface" ) root.AddGeometry( "Disc", "NurbsSurface" ) root.AddGeometry( "Cube", "NurbsSurface" ) # Get an X3DCollection xc = Application.ActiveSceneRoot.FindChildren() Application.LogMessage( Application.ClassName(xc) ) # Find all nurbs primitives in the collection nrbs = xc.Filter( c.siSrfMeshPrimType ) Application.LogMessage( nrbs.GetAsText() ) # Expected result: #INFO : X3DObjectCollection #INFO : cone,disc1,cube |
/* This example logs all children under the scene root */ NewScene( null, false ); var root = Application.ActiveSceneRoot; // Set the scene up root.AddPrimitive( "Square" ); root.AddGeometry( "Disc", "MeshSurface" ); root.AddGeometry( "Disc", "MeshSurface" ); root.AddGeometry( "Cube", "MeshSurface" ); // Get an X3DCollection var kids = Application.ActiveSceneRoot.FindChildren(); Application.LogMessage( Application.ClassName(kids) ); // Find all discs in the collection var discs = kids.Filter( siDiscPrimType ); Application.LogMessage( discs.GetAsText() ); // Expected result: //INFO : X3DObjectCollection //INFO : disc,disc1 |
' ' This example logs all children under the scene root ' NewScene , false set sr = Application.ActiveSceneRoot ' Set the scene up sr.AddPrimitive "Arc" sr.AddPrimitive "Arc" sr.AddGeometry "Cone" sr.AddNull ' Get an X3DCollection set x3dc = Application.ActiveSceneRoot.FindChildren() Application.LogMessage TypeName(x3dc) ' Find all arc primitives in the collection set arcs = x3dc.Filter(siArcPrimType) Application.LogMessage arcs.GetAsText() ' Expected result: 'INFO : X3DObjectCollection 'INFO : arc,arc1 |