Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.

VB
'-----------------------------------------------------------------------------  
' 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 " 

...
..
.
Posted

1 solution

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[^].
 
Share this answer
 
Comments
Reader Man San 17-Sep-15 12:19pm    
Sorry for my question, as i am new to posting to codeproject, i have read the two guide lines, but maybe i am a slow thinker than others.

so, i will try to ask it again to make sure that i understood your answer:

I have several vbscript files, that manipulate SAP PowerDesigner objects to help in speeding and fixing huge number of objects in matter of seconds.

so, your answer of "No to not post it in codeproject", is because of the code related to PowerDesigner, or vbscript, or because it does not benefit a lot of people?

Regards, and sorry for my slow thinking.
Richard MacCutchan 17-Sep-15 12:35pm    
As I said before, not unless this is likely to benefit a lot of people, or teach them some useful tricks, and that is for you to judge. You also need to ensure you provide full descriptions of what the issue addresses and what the code does. If you are new to CodeProject it may be better to wait a few weeks until you have read and learned the sort of articles and tips that get accepted here.
Reader Man San 17-Sep-15 13:03pm    
Thank you, i meant i am new in the sense of posting to codeproject, but i have been reading from it for years.

i will try to think about it more, and maybe if i see it fit, i will make it as a tip.

Regards.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900