#1
|
|||
|
|||
Custom Actions
I created a custom action that calls a .net DLL. I want to pass in a name of a Macro and what type it is. I created two properties one for the MacroName and the other for the MacroType.
The MacroType Property is a Radio Button with a List Data = "Temporary; Project; Global". I can pass in the value to my action only if its not the first option. If Project or Global is selected a value of 1 or 2 is passed in. If Temporary is selected a null value is passed in. I checked the build script if I select the first value "Temporary" then nothing is stored in the script file. This occurs even if I make the defualt value for that property a value of 2. It still doenst conatin any data in the DLL or the script file. I would have expected a value of 0 (zero) to be passed in. Am I doing something wrong? |
#2
|
|||
|
|||
The default value refers to what the field will default to when a new step of that action type is displayed in the GUI (and stored in the .bld file if the default is used).
http://www.kinook.com/VisBuildPro/Ma...propguitab.htm For radio and combo property types, a value of 0 (the first item in the list/radio) is not stored in the .bld file and it will default to 0 when retrieved. |
#3
|
|||
|
|||
If the default is 0 then when my DLL is called a value of null is passed in. If in the property window of the custom action I set the default to another value other then 0 then if the first value is selected then the approprate value is passed in.
Also the value is now stored in the script file itself. |
#4
|
|||
|
|||
Are you using Step.ExpProperty to retrieve the value in the custom action (see the NETAction or VBNETAction sample)?
http://www.kinook.com/VisBuildPro/Ma...rdefaction.htm Please send a reproducible test case. http://www.kinook.com/Forum/showthre...?threadid=3044 Thanks. |
#5
|
|||
|
|||
See attached file.
|
#6
|
|||
|
|||
Add
, VariantType.Integer to the ExpProperty call. http://www.kinook.com/VisBuildPro/Ma...xpproperty.htm |
#7
|
|||
|
|||
That did the trick!!! Thanks for the quick response!!
|
|
|