示例:复制文件夹

本示例用于在文件夹中创建标签,然后复制文件夹。
Sub DuplicateTagDBFolder() On Error GoTo Err_Handler Dim oNewTag As Tag 'Create folders and tag. Set oNewTag = TagDB.CreateTag("Line1\Motor1\Speed", AnalogTag) 'Configure tag properties. oNewTag.Description = "Motor Speed." 'Save the tag configuration. oNewTag.WriteConfiguration 'Release resources associated with the tag object. Set oNewTag = Nothing 'Duplicate the Motor1 folder and its contents. TagDB.DuplicateFolder "Line1\Motor1", "Line1\Motor2" Exit Sub Err_Handler: 'Release resources associated with the tag object. Set oNewTag = Nothing MsgBox Err.Description, vbExclamation, "DuplicateFolder" End Sub
提供反馈
对本文档有问题或反馈吗? 请在这里提交您的反馈
Normal