當前位置: 首頁>>代碼示例>>Python>>正文


Python DCC.get_handle方法代碼示例

本文整理匯總了Python中DCC.get_handle方法的典型用法代碼示例。如果您正苦於以下問題:Python DCC.get_handle方法的具體用法?Python DCC.get_handle怎麽用?Python DCC.get_handle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DCC的用法示例。


在下文中一共展示了DCC.get_handle方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: print

# 需要導入模塊: import DCC [as 別名]
# 或者: from DCC import get_handle [as 別名]
            print('\n\t DCC View URL: ',Tree.url_view(fd['handle']),'\n')

            print('*** [', dcc_doc, '] is recorded as published in Document Module')
            if not 'TMTPublished' in fd['keywords']:
                print('*** WARNING: Document in Published Collection, but TMTPublished keyword is not set')
#                 print('Checking flag_update = ',flag_update)
                if flag_update and MyUtil.get_yn('Change DCC Keyword to add TMTPublished (Y/N)? '):
                    DCC.set_metadata(s,fd['handle'],Keywords = fd['keywords'] + ' TMTPublished')
                                    
            docmod_title = docmatch[dcc_doc].get('dccDocTitle', 'No Attribute Value Assigned')
            docmod_type = docmatch[dcc_doc].get('DocType', 'No Attribute Value Assigned')
            docmod_short = docmatch[dcc_doc].get('dccShortTitle', 'No Attribute Value Assigned')
            docmod_no = docmatch[dcc_doc].get('dccDocNo', 'No Attribute Value Assigned')
            docmod_rev = docmatch[dcc_doc].get('dccDocRev', 'No Attribute Value Assigned') 
            docmod_cadno = docmatch[dcc_doc].get('CADDocumentNo', '')
            docmod_ver = DCC.get_handle(docmatch[dcc_doc]['dccDocVersionHyperlink'])
            
            # if ICD then combing docmod title and short title
            if '.ICD.' in docmod_no and not 'Drawing' in docmod_type:
                docmod_title = docmod_short.strip() + ' ---- ' + docmod_title.strip()
            
            if not fd['title'] == docmod_title:
                print('*** WARNING: Titles do not match')
                print('\tDCC Title: ', fd['title'])
                print('\tDocMod Title: ', docmod_title)
                if flag_update and MyUtil.get_yn('Change DCC Title to Match DocMod (Y/N)? '):
                    DCC.set_metadata(s,fd['handle'],Title = docmod_title)
                    
            if not fd['versions']['prefver'] == docmod_ver:
                print('*** WARNING: Preferred Versions do not match')
                print('\tDCC Version Handle: ', fd['versions']['prefver'])
開發者ID:gtrancho,項目名稱:Utilities,代碼行數:33,代碼來源:DocModAudit.py


注:本文中的DCC.get_handle方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。