CATIA VBA sublist

作者: 锦囊喵 | 来源:发表于2020-02-10 16:16 被阅读0次

    Func SubList( AnyObject iObject, boolean iRecursively) As Parameters

    Returns a sub-collection of parameters aggregated to an object.

    Parameters:
    iObject
    The object used to filter the whole parameter collection to get the resulting sub-collection.
    iRecursively
    A flag to specify if children parameters are to be searched for in the returned collection
    Example:

    'This example shows how to retrieve a collection of '
    'parameters that are associated to a Pad. '
     Dim Parameters1 As Parameters
     Set Parameters1 = CATIA.ActiveDocument.Part.Parameters 
    'gets the collection of parameters in the part'
     Dim Body0 As AnyObject
     Set Body0 = CATIA.ActiveDocument.Part.Bodies.Item  ( "MechanicalTool.1" ) 
     Dim Pad1 As AnyObject
     Set Pad1 = Body0.Shapes.Item  ( "Pad.1" ) 
    'gets the pad Pad.1
     Dim Parameters2 As Parameters'
     Set Parameters2 = Parameters1.SubList(Pad1,TRUE) 
    'Sublist第二个参数为true,所以可以从顶层直接get 基础的Pad内的参数'
    'gets the collection of parameters that are under the pad Pad.1'
    

    相关文章

      网友评论

        本文标题:CATIA VBA sublist

        本文链接:https://www.haomeiwen.com/subject/kggaxhtx.html