beckhoff TE1000 TwinCAT 3 — 5.8.2.2 ITcTypeSystem2::CreateTemporaryDataType

API | ITcTypeSystem 5.8.2.1 ITcTypeSystem2::CreateAlignedDataType | ITcTypeSystem2::CreateAlignedDataType Creates a temporary type or a temporary data type derived from a DataArea , and then attempts to align it to the specified byte boundary. The result of the alignment check is indicated via pIsAligned . The method returns the generated type even if the alignment fails, as long as the parsing and generation themselves were successful. Signature HRESULT CreateAlignedDataType(BSTR xml, LONG alignmentSizeInBytes, ITcTypeInstance2** pipType, BSTR* pErrorMessage, VARIANT_BOOL* pIsAligned); Parameter Return value Error codes E_POINTER : pipType , pErrorMessage , or pIsAligned is NULL .

ADS_E_ERROR : The XML is unreadable or contains a node that is not supported. Errors passed on from ImportXml(...) or CreateDataType(...) if the temporary type cannot be set-up. 5.8.2.2 ITcTypeSystem2::CreateTemporaryDataType | ITcTypeSystem2::CreateTemporaryDataType Creates an unregistered temporary type instance from XML. The following are supported: TcTemporaryDataType/DataType , TcTemporaryDataType/DataArea , as well as direct DataType or DataArea nodes. Signature HRESULT CreateTemporaryDataType(BSTR xml, ITcTypeInstance2** pipType); Parameter TE1000 76 Version: 1.7.0 Method Description CreateTemporaryDataType Creates a temporary type or a temporary DataArea from XML.

ImportDataTypesFromTmcFile Imports data types from a .tmc file. Name Type Description xml BSTR [in] XML with a temporary type or DataArea definition. alignmentSizeInByte s LONG [in] Desired alignment size in bytes. pipType ITcTypeInstance2** [out] Temporary type instance created. pErrorMessage BSTR* [out] Error message from the alignment check, if one was generated. Name Type Description pIsAligned VARIANT BOOL* _ [out, retval] VARIANT TRUE if the generated type is _ aligned, otherwise VARIANT FALSE. _ (HRESULT) HRESULT S OK if the type instance is successfully created; _ otherwise, an error code. Name Type Description xml BSTR [in] XML with a temporary type or DataArea definition.