pycatia.dnb_dpm_interfaces.mfg_assembly_factory¶
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-09-25 14:34:21.593357
Warning
The notes denoted “CAA V5 Visual Basic Help” are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus help debugging in pycatia.
- class pycatia.dnb_dpm_interfaces.mfg_assembly_factory.MfgAssemblyFactory(com_object)¶
Note
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectMfgAssemblyFactoryRepresents the factory to creates a manufacturing assembly.Role: It gives access to the C++ DNBIMfgAssemblyFactory interface methods SuchasCreates a manufacturing assemblyExample:This example fetches an instance of a Manufacturing Assembly factory in a aactive document and then creates a manufactring assemblyDim objMAfact As MfgAssemblyFactorySet objMAfact = CATIA.ActiveDocument.GetItem(“MfgAssemblyFactory”)- create_mfg_assembly(i_name_bstr: str, i_part_number_bstr: str, i_type: int) Item ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func CreateMfgAssembly(CATBSTR iNameBSTR,CATBSTR iPartNumberBSTR,DNBIAMfgAssemblyType iType) As ItemCreates a manufacturing assembly of given type “iType”. This API cannot beused to create a Manufacturing Assembly of type AST(assemblySpecTree) orManufacturing Output(manufacturingOutput)Parameters:iNameBSTRName of the manufacturing assemblyiPartNumberBSTRPart-number of the manufacturing assemblyiTypeType of the Manufacturing Assembly. If its value is “notSpecified”(or 4), the new assembly created will be of type “manufacturingAssembly”oMfgAssemblyHandler of the Manufacturing Assembly createdExample:This example creates a Manufacturing Assembly of type“manufacturingKit” having MAName as “MKit1” and part-number as“Kit1”Dim matype As DNBIAMfgAssemblyTypematype=manufacturingKitDim MA As MfgAssembly (Or Dim MA As item)objMAfact.CreateMfgAssembly“MKit1”,”Kit1”,matype,MAwhere objMAfact is a instance of Automation Interface forManufacturing Assembly as shown earlier
- Parameters:
i_name_bstr (str) –
i_part_number_bstr (str) –
i_type (int) – enum dnbia_mfg_assembly_type
- Return type:
- get_number_of_all_mfg_assy(i_type: int, o_num_of_mfg_assemblies: int) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub GetNumberofALLMfgAssy(DNBIAMfgAssemblyType iType,long oNumOfMfgAssemblies)Get the number of Manufacturing Assemblies(MA) of given type in MAApplicative ContainerParameters:iTypeType of MA to be considered. If its value is “notSpecified” (or 4),all the MAs will be consideredoNumOfMfgAssembliesNumber of MAs foundExample:For example getting the number of MA of type “manufacturingKit”and displaying them in the Message Box.Dim matype As DNBIAMfgAssemblyTypematype=manufacturingKitDim nbMfgAssembliesobjMAfact.GetNumberofALLMfgAssymatype,nbMfgAssembliesMsgBox nbMfgAssemblies
- Parameters:
i_type (int) – enum dnbia_mfg_assembly_type
o_num_of_mfg_assemblies (int) –
- Return type:
None
- get_number_of_mfg_assemblies() int ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func GetNumberOfMfgAssemblies() As longGet the number of Manufacturing Assemblies in MA ApplicativeContainerParameters:oNumOfMfgAssembliesnumber of Manufacturing Assemblies in MA ApplicativeContainerExample:For example getting the number of Manufacturing assemblies anddisplaying them in the Message Box.Dim nbMfgAssembliesSet nbMfgAssemblies = objMAfact.GetNumberOfMfgAssembliesMsgBox nbMfgAssemblies
- Return type:
int
- remove_mfg_assembly(i_mfg_assembly: Item) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub RemoveMfgAssembly(Item iMfgAssembly)Removes a given Manufacturing Assembly from the MA Applicative Container.Please note that the AST MA cannot be removedParameters:iMfgAssemblyManufacturing assembly to be removed or deletedExample:For example deleting the first MA from the ApplicativeContainerDim mfgAssy As ItemSet mfgAssy = objMAfact.RetrieveMfgAssemblyAtIndex(1)objMAfact.RemoveMfgAssembly mfgAssy
- Parameters:
i_mfg_assembly (Item) –
- Return type:
None
- retrieve_mfg_assembly(i_name_bstr: str, o_mfg_assemblies: tuple, o_num_of_mfg_assemblies: int) AnyObject ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub RetrieveMfgAssembly(CATBSTR iNameBSTR,CATSafeArrayVariant oMfgAssemblies,long oNumOfMfgAssemblies)Retrieve all the Manufacturing Assemblies of a given name.Parameters:iNameBSTRName of the manufacturing assemblyoMfgAssembliesArray of the Items of the type “MfgAssembly”. Array need to beallocated before passing. In case, if the size allocated is found to be lessthan the actual number of Manufacturing Assemblies found, the number of MAsreturned will be equal to size of array passed onlyoNumOfMfgAssembliesNumber of MAs found with the given name. If the actual number ofMAs found is greater than the size of the array passed, then value returnedwill be equal to the size of the array itself.Example:For example retriving all the MAs with the name “MA_TYPE1” fromthe MA Applicative ContainerDim nbMfgAssembliesSet nbMfgAssemblies = objMAfact.GetNumberOfMfgAssembliesDim MAList() As AnyObjectReDim MAList(nbMfgAssemblies-1)Dim NbMAobjMAfact.RetrieveMfgAssembly“MA_TYPE1”,MAList,NbMAMsgBox NbMA
- Parameters:
i_name_bstr (str) –
o_mfg_assemblies (tuple) –
o_num_of_mfg_assemblies (int) –
- Return type:
- retrieve_mfg_assembly_at_index(i_index: cat_variant) Item ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func RetrieveMfgAssemblyAtIndex(CATVariant iIndex) As ItemRetrieves a Manufacturing Assembly at the given index from the MAApplicative Container.Parameters:iIndexIndexoItemManufacturing Assembly at the above IndexExample:For example retriving all the MAs from the ApplicativeContainerDim nbMfgAssembliesSet nbMfgAssemblies = objMAfact.GetNumberOfMfgAssembliesFor II = 0 to MyNum-1Dim mfgAssy As ItemSet mfgAssy = objMAfact.RetrieveMfgAssemblyAtIndex(II)Next
- Parameters:
i_index (cat_variant) –
- Return type:
- retrive_all_mfg_assy(i_type: int, o_all_m_as: tuple, o_num_of_mfg_assemblies: int) AnyObject ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub RetriveALLMfgAssy(DNBIAMfgAssemblyType iType,CATSafeArrayVariant oAllMAs,long oNumOfMfgAssemblies)Retrieve all the Manufacturing Assemblies of a given type.Parameters:iTypeType of manufacturing assemblies to be retrieved. If its value is“notSpecified” (or 4), all the manufacturing assemblies will be returnedoMfgAssembliesArray of the Items of the type “MfgAssembly”. Array need to beallocated before passing. In case, if the size allocated is found to be lessthan the actual number of Manufacturing Assemblies found, the number of MAsreturned will be equal to size of array passed onlyoNumOfMfgAssembliesNumber of MAs found. If the actual number of MAs found is greaterthan the size of the array passed, then value returned will be equal to thesize of the array itself.Example:For example: Code for retriving all the MAs of type“manufacturingKit” from the MA ApplicativeContainerDim matype As DNBIAMfgAssemblyTypematype=manufacturingKitDim nbMfgAssembliesobjMAfact.GetNumberofALLMfgAssymatype,nbMfgAssembliesDim MAList() As AnyObjectReDim MAList(nbMfgAssemblies)Dim NbMAobjMAfact.RetriveALLMfgAssymatype,MAList,NbMA
- Parameters:
i_type (int) – enum dnbia_mfg_assembly_type
o_all_m_as (tuple) –
o_num_of_mfg_assemblies (int) –
- Return type: