Discussion:
VB Script Selection API for PD v16
(too old to reply)
AK
2012-03-12 21:16:53 UTC
Permalink
Hello

I have couple of questions regarding VB Script API for PowerDesigner.

1) I developed VB Scripts to add additional columns to my PDM tables. Currently I hard coded the table name in the script so whenever I need to execute this script for a new table, I have to modify the script to add the new table name and then execute the script. I am wondering if there is an API which can capture the user's selection criteria in PD and populate this value to table name variable in the VB script so that I can then use this script on the fly for any table by selecting a table in the diagram. Do you know what is the API / method which captures the user's selection criteria?

2) Is there a published VB script API for PD v16?

Any help would be greatly appreciated.

Thanks.
wvbigfoot
2012-03-13 18:51:56 UTC
Permalink
#1 If you have an extension file,
add table as a metaclass (right click Profile, select new metaclass, checkmark table)
Create a new Method under table (right click table, select new method)
Copy your script into the method. (changes may be needed)
change the name of your method.

create a new menu under table (right click table, select new menu)
Add the method to the menu

save the extension file by clicking Apply or Save

USE: Right click the table, Click your method name from the list of actions.
NOTE The object selected will be passed into the method as: obj


To Create an extension file, Menu --> Model --> Extensions
Click in an empty row, click on properties (leftmost icon)


#2 Metamodel Objects Help
Post by AK
Hello
I have couple of questions regarding VB Script API for PowerDesigner.
1) I developed VB Scripts to add additional columns to my PDM tables. Currently I hard coded the table name in the script so whenever I need to execute this script for a new table, I have to modify the script to add the new table name and then execute the script. I am wondering if there is an API which can capture the user's selection criteria in PD and populate this value to table name variable in the VB script so that I can then use this script on the fly for any table by selecting a table in the diagram. Do you know what is the API / method which captures the user's selection criteria?
2) Is there a published VB script API for PD v16?
Any help would be greatly appreciated.
Thanks.
AK
2012-03-14 23:26:40 UTC
Permalink
Thanks for your help. I was able to modify my VB scripts and add them to Table methods.

In a Physical Data Model, for a given table if we navigate to a Table Properties - Columns tab, for each column that is defined we see M, F, P properties. I would like to add another property called A (Audit Column) so that for each column I am adding to the table I can check this property. How do I accomplish this?

I tried customizing the Physical Data Model extension file and didn't find a way to customize the default form layout.

AK
Post by wvbigfoot
#1 If you have an extension file,
add table as a metaclass (right click Profile, select new metaclass, checkmark table)
Create a new Method under table (right click table, select new method)
Copy your script into the method. (changes may be needed)
change the name of your method.
create a new menu under table (right click table, select new menu)
Add the method to the menu
save the extension file by clicking Apply or Save
USE: Right click the table, Click your method name from the list of actions.
NOTE The object selected will be passed into the method as: obj
To Create an extension file, Menu --> Model --> Extensions
Click in an empty row, click on properties (leftmost icon)
#2 Metamodel Objects Help
Post by AK
Hello
I have couple of questions regarding VB Script API for PowerDesigner.
1) I developed VB Scripts to add additional columns to my PDM tables. Currently I hard coded the table name in the script so whenever I need to execute this script for a new table, I have to modify the script to add the new table name and then execute the script. I am wondering if there is an API which can capture the user's selection criteria in PD and populate this value to table name variable in the VB script so that I can then use this script on the fly for any table by selecting a table in the diagram. Do you know what is the API / method which captures the user's selection criteria?
2) Is there a published VB script API for PD v16?
Any help would be greatly appreciated.
Thanks.
#1 If you have an extension file,
add table as a metaclass (right click Profile, select new metaclass, checkmark table)
Create a new Method under table (right click table, select new method)
Copy your script into the method. (changes may be needed)
change the name of your method.
create a new menu under table (right click table, select new menu)
Add the method to the menu
save the extension file by clicking Apply or Save
USE: Right click the table, Click your method name from the list of actions.
NOTE The object selected will be passed into the method as: obj
To Create an extension file, Menu --> Model --> Extensions
Click in an empty row, click on properties (leftmost icon)
#2 Metamodel Objects Help
Post by AK
Hello
I have couple of questions regarding VB Script API for PowerDesigner.
1) I developed VB Scripts to add additional columns to my PDM tables. Currently I hard coded the table name in the script so whenever I need to execute this script for a new table, I have to modify the script to add the new table name and then execute the script. I am wondering if there is an API which can capture the user's selection criteria in PD and populate this value to table name variable in the VB script so that I can then use this script on the fly for any table by selecting a table in the diagram. Do you know what is the API / method which captures the user's selection criteria?
2) Is there a published VB script API for PD v16?
Any help would be greatly appreciated.
Thanks.
wvbigfoot
2012-03-15 17:07:35 UTC
Permalink
On the columns tab, click the icon that looks like a funnel and pencil (4th from the right end), you wil be able to select and set the order of the properties you wish to see.
Post by AK
Thanks for your help. I was able to modify my VB scripts and add them to Table methods.
In a Physical Data Model, for a given table if we navigate to a Table Properties - Columns tab, for each column that is defined we see M, F, P properties. I would like to add another property called A (Audit Column) so that for each column I am adding to the table I can check this property. How do I accomplish this?
I tried customizing the Physical Data Model extension file and didn't find a way to customize the default form layout.
AK
Post by wvbigfoot
#1 If you have an extension file,
add table as a metaclass (right click Profile, select new metaclass, checkmark table)
Create a new Method under table (right click table, select new method)
Copy your script into the method. (changes may be needed)
change the name of your method.
create a new menu under table (right click table, select new menu)
Add the method to the menu
save the extension file by clicking Apply or Save
USE: Right click the table, Click your method name from the list of actions.
NOTE The object selected will be passed into the method as: obj
To Create an extension file, Menu --> Model --> Extensions
Click in an empty row, click on properties (leftmost icon)
#2 Metamodel Objects Help
Post by AK
Hello
I have couple of questions regarding VB Script API for PowerDesigner.
1) I developed VB Scripts to add additional columns to my PDM tables. Currently I hard coded the table name in the script so whenever I need to execute this script for a new table, I have to modify the script to add the new table name and then execute the script. I am wondering if there is an API which can capture the user's selection criteria in PD and populate this value to table name variable in the VB script so that I can then use this script on the fly for any table by selecting a table in the diagram. Do you know what is the API / method which captures the user's selection criteria?
2) Is there a published VB script API for PD v16?
Any help would be greatly appreciated.
Thanks.
#1 If you have an extension file,
add table as a metaclass (right click Profile, select new metaclass, checkmark table)
Create a new Method under table (right click table, select new method)
Copy your script into the method. (changes may be needed)
change the name of your method.
create a new menu under table (right click table, select new menu)
Add the method to the menu
save the extension file by clicking Apply or Save
USE: Right click the table, Click your method name from the list of actions.
NOTE The object selected will be passed into the method as: obj
To Create an extension file, Menu --> Model --> Extensions
Click in an empty row, click on properties (leftmost icon)
#2 Metamodel Objects Help
Post by AK
Hello
I have couple of questions regarding VB Script API for PowerDesigner.
1) I developed VB Scripts to add additional columns to my PDM tables. Currently I hard coded the table name in the script so whenever I need to execute this script for a new table, I have to modify the script to add the new table name and then execute the script. I am wondering if there is an API which can capture the user's selection criteria in PD and populate this value to table name variable in the VB script so that I can then use this script on the fly for any table by selecting a table in the diagram. Do you know what is the API / method which captures the user's selection criteria?
2) Is there a published VB script API for PD v16?
Any help would be greatly appreciated.
Thanks.
i***@casimir.ca
2012-04-11 18:02:52 UTC
Permalink
Post by wvbigfoot
On the columns tab, click the icon that looks like a funnel and pencil (4th from the right end), you wil be able to select and set the order of the properties you wish to see.
Post by AK
Thanks for your help. I was able to modify my VB scripts and add them to Table methods.
In a Physical Data Model, for a given table if we navigate to a Table Properties - Columns tab, for each column that is defined we see M, F, P properties. I would like to add another property called A (Audit Column) so that for each column I am adding to the table I can check this property. How do I accomplish this?
I tried customizing the Physical Data Model extension file and didn't find a way to customize the default form layout.
AK
Post by wvbigfoot
#1 If you have an extension file,
   add table as a metaclass (right click Profile, select new metaclass, checkmark table)
   Create a new Method under table (right click table, select new method)
   Copy your script into the method. (changes may be needed)
   change the name of your method.
   create a new menu under table (right click table, select new menu)
   Add the method to the menu
   save the extension file by clicking Apply or Save
USE: Right click the table, Click your method name from the list of actions.
NOTE The object selected will be passed into the method as: obj
To Create an extension file, Menu --> Model --> Extensions
   Click in an empty row, click on properties (leftmost icon)
#2 Metamodel Objects Help
Post by AK
Hello
I have couple of questions regarding VB Script API for PowerDesigner.
1) I developed VB Scripts to add additional columns to my PDM tables. Currently I hard coded the table name in the script so whenever I need to execute this script for a new table, I have to modify the script to add the new table name and then execute the script. I am wondering if there is an API which can capture the user's selection criteria in PD and populate this value to table name variable in the VB script so that I can then use this script on the fly for any table by selecting a table in the diagram. Do you know what is the API / method which captures the user's selection criteria?
2) Is there a published VB script API for PD v16?
Any help would be greatly appreciated.
Thanks.
#1 If you have an extension file,
   add table as a metaclass (right click Profile, select new metaclass, checkmark table)
   Create a new Method under table (right click table, select new method)
   Copy your script into the method. (changes may be needed)
   change the name of your method.
   create a new menu under table (right click table, select new menu)
   Add the method to the menu
   save the extension file by clicking Apply or Save
USE: Right click the table, Click your method name from the list of actions.
NOTE The object selected will be passed into the method as: obj
To Create an extension file, Menu --> Model --> Extensions
   Click in an empty row, click on properties (leftmost icon)
#2 Metamodel Objects Help
Post by AK
Hello
I have couple of questions regarding VB Script API for PowerDesigner.
1) I developed VB Scripts to add additional columns to my PDM tables. Currently I hard coded the table name in the script so whenever I need to execute this script for a new table, I have to modify the script to add the new table name and then execute the script. I am wondering if there is an API which can capture the user's selection criteria in PD and populate this value to table name variable in the VB script so that I can then use this script on the fly for any table by selecting a table in the diagram. Do you know what is the API / method which captures the user's selection criteria?
2) Is there a published VB script API for PD v16?
Any help would be greatly appreciated.
Thanks.- Masquer le texte des messages précédents -
- Afficher le texte des messages précédents -
Do you can post-it (attach) your VB script ? I would like used-it
thank you

Loading...