Use VBA to copy the name of PowerDesigner to comment

Source: Internet
Author: User
Tags powerdesigner

The code is as follows:

Option   Explicit '-------------------------------------------------------------------------------'role: PowerDesigner physical model Copy name to comment"'Author: lio5n'Time: 2015-12-18"'version: V1.0"'Description: If comment has a value, it is not overwritten; can be repeated and not replicated multiple times'-------------------------------------------------------------------------------Validationmode=TrueInteractivemode=Im_batchDimmdl'Current Model'gets the currently active model SetMDL =ActivemodelIf(MDL is    Nothing) Then        MsgBox   "the active model was not found! "  ElseIf    notmdl. IsKindOf (Pdpdm.cls_model) Then        MsgBox   "The current model is not a physical model! "  ElseProcessFolder MDLMsgBox "execution Done! " End   If'Copy the name to comment function Private   SubProcessFolder (folder)Dim   Tab   'Table Processing        for    each   Tab   inchFolder.tablesif    not   Tab. isshortcut Then                                       if  Left(Trim(Tab. Comment),Len(Trim(Tab. Name)) <>Trim(Tab. Name) Then                   Tab. Comment =Trim(Tab. Name) +" "+Trim(Tab. Comment)Tab. Comment =Trim(Tab. Comment)End if                                      DimCol'Field Handling                    for    eachColinch   Tab. Columnsif  Left(Trim(Col.comment),Len(Trim(col.name))) <>Trim(Col.name) Thencol.comment=Trim(col.name) +" "+Trim(col.comment) col.comment=Trim(col.comment)End if                   Next              End   if        Next      DimView'View Processing        for    eachViewinchfolder. viewsif    notView.isshortcut Then                  if  Left(Trim(View.comment),Len(Trim(view.name))) <>Trim(View.name) Thenview.comment=Trim(view.name) +" "+Trim(view.comment) view.comment=Trim(view.comment)End if             End   if        Next      'Enter Sub Floder       DimF'Sub Folder        for    eachFinchfolder. Packagesif    notF.isshortcut ThenProcessFolder FEnd   if        Next  End   Sub

Use VBA to copy the name of PowerDesigner to comment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.