我可以在Sap Powerdesigner中发布Vbscript代码以加速/修复事物 [英] Can I Post Vbscript Code For Speeding/Fixing Things In Sap Powerdesigner
问题描述
i有用于加速/修复SAP PowerDesigner内容的代码,用vbscript编写,所以我可以发布代码项目吗?
这是一个:
通过修复一些问题为数据库脚本生成准备PDM模型
每次,我在生成数据库创建脚本时遇到了一些问题,所以我创建了以下脚本来处理这些问题。
主要是
*收集并显示超过128个字符的引用名称,以便我们缩短它们。
*停止更新并删除循环引用的约束,开始于:zRecursive,zRelDependent,zRelTwo,zzOptional,zRecyclec
*停止生成触发器。
' ----------- -------------------------------------------------- ----------------
' 主要功能
' ------------------------------------------ -----------------------------------
' 获取当前有效模型
Dim mdl
Dim Fldr
Dim RQ
Dim isFound
Dim strLongReferenceNames
dim iCountChanged,iCountNotChanged, iCountEntities
dim iAllTables
dim iAllIndex
dim glob_IndexFound
dim glob_iIndex_Removed
设置 mdl = ActiveModel
调用 mainProcedure
sub mainProcedure()
如果(mdl Nothing )然后
MsgBox 没有活动模型
退出 sub
结束 如果
如果 不 mdl .IsKindOf(PdPDM.cls_Model)然后
MsgBox 这不是PDM
退出 sub
< span class =code-keyword> end i f
设置 Fldr = ActiveDiagram.Parent
RQ = MsgBox( 从文件夹开始:& Fldr.Name& 运行?,vbYesNo + vbInformation, 确认)
如果 RQ = VbNo 然后
退出 sub
结束 如果
' ------------------------------------
iCountChanged = 0
iCountEntities = 0
iCountNotChanged = 0
FixReferences mdl
输出 _____参考基数改变=& iCountChanged& span class =code-string> in& iCountEntities& 实体。并且未更改=& iCountNotChanged
' ---------------- --------------------
iCountChanged = 0
iCountEntities = 0
iCountNotChanged = 0
strLongReferenceNames =
start_Reference_CheckName mdl
output _____参考文献长于128,发现=& iCountChanged& in
...
..
。
不,除非它教会人们真正有用的东西,绝对不是在这里。请阅读代码项目快速解答常见问题解答 [ ^ ]和 http://www.codeproject.com/info/Submit.aspx [ ^ ]。
Hi,
i have code for speeding/fixing things in SAP PowerDesigner, written in vbscript, so can i post it codeproject?
Here is one:
Prepare PDM model for Database Script Generation, by fixing some problems
Each time, I had several problems when generating the database creation script, so i created the following script to handle these issues.
which are mainly
* Collect and show the reference names that are longer than 128 characters, so we can shorten them.
* Stop the update and delete constrains for cyclic references, that start with: zRecursive, zRelDependent, zRelTwo, zzOptional, zRecyclec
* Stop generating the triggers.
'-----------------------------------------------------------------------------
' Main function
'-----------------------------------------------------------------------------
' Get the current active model
Dim mdl
Dim Fldr
Dim RQ
Dim isFound
Dim strLongReferenceNames
dim iCountChanged, iCountNotChanged, iCountEntities
dim iAllTables
dim iAllIndex
dim glob_IndexFound
dim glob_iIndex_Removed
Set mdl = ActiveModel
call mainProcedure
sub mainProcedure()
If (mdl Is Nothing) Then
MsgBox "There is no Active Model"
exit sub
End If
If Not mdl.IsKindOf(PdPDM.cls_Model) Then
MsgBox "This is not PDM"
exit sub
end if
Set Fldr = ActiveDiagram.Parent
RQ = MsgBox ("Starting at Folder: " & Fldr.Name & " Is Run ?", vbYesNo + vbInformation,"Confirmation")
if RQ= VbNo then
exit sub
end if
'------------------------------------
iCountChanged = 0
iCountEntities = 0
iCountNotChanged = 0
FixReferences mdl
output "_____Reference Cardinality changed = " & iCountChanged & " in " & iCountEntities & " Entities. and not changed = " & iCountNotChanged
'------------------------------------
iCountChanged = 0
iCountEntities = 0
iCountNotChanged = 0
strLongReferenceNames = ""
start_Reference_CheckName mdl
output "_____Reference Longer than 128, found = " & iCountChanged & " in "
...
..
.
No, not unless it teaches people something really useful, and definitely not here. Please read Code Project Quick Answers FAQ[^] and http://www.codeproject.com/info/Submit.aspx[^].
这篇关于我可以在Sap Powerdesigner中发布Vbscript代码以加速/修复事物的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!