View Single Post
  #2  
Old 03-22-2004, 08:47 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
You've got it. One thing you could do is store the return value of the Add call and use it to set the properties (a little more efficient and compact):

set objStep = steps.Add("Make VS.NET", 6)
objStep.Indent=2
objStep.Property("xyz") = value
...

The Script.bld also demonstrates this (Dynamic project section), although it creates the steps in a separate project file and then calls it.

To see the properties you need for that action, manually create and populate a Make VS.NET step, then either print/preview the project (ensure that 'Tools | User Options | Printing | Show extended step properties' is checked) to see the custom step property names, or save and then open the .bld file in a text editor and examine the element names within that step.

Note that the property names are case sensitive. Also, be aware that when a property is set to its default value (i.e., unchecked for checkboxes, blank for strings, etc.), VBP optimizes the file/step object size by removing those properties. As long as you customize the temporary/manual step in the same way your code will need to generate it, this shouldn't be a problem (you will not need to populate such properties on the dynamic step either).
Reply With Quote