SetCalculationColumnProperties

 

Purpose: Set up a Calculation / Indicator SmartColumn

 

 

Argument  

Type

Required

Purpose

1

Integer

Yes

Column (1-20) See Column Numbering to see how columns are numbered.

2

String

Yes

Property

     

"Type"- argument 3 is 0,1,2,3,4, or 5

Argument 3

 

0

calculate two columns (must set for "Factor1 and Factor2")

1

column times %complete (must set column for "Factor1")

2

column times %not complete (must set column for "Factor1")

3

Indicator only

4

column times %duration to current date (must set column for "Factor1")

5

select the new column (+ or / or – or x) constant calculation.

      "Factor1" argument 3 is 1-20  (not needed for type 4)
      "Factor2" argument 3 is 1-20  (not needed for type 2,3,4)
     

"Operator" argument 3 is 0=mult, 1=add, 2=minus, 3=divide

     

"DoNotCalculateOnSummaryLine"  argument 3 is 0 (false) or 1 (true)

     

"ShowResultAsPercent" argument 3 is 0 (false) or 1 (true)

     

"ShowSummaryValueAsAverage"  argument 3 is 0 (false) or 1 (true) - This setting only applies to Values... SmartColumns only.  

     

"AddPercentSign" argument 3 is 0 (false) or 1 (true)

     

"JustShowKeyedValueInSummaryLines" argument 3 is 0 (false) or 1 (true) only has meaning for Values... column.  This will cause the value entered or added via automation to be displayed instead of any value which might be calculated by the software.

     

  

     

Indicator settings

     

"ColumnToCompare" argument 3 is 1-20  See Column Numbering to see how columns are numbered.

     

"SymbolSize"  argument 3 is 0.1 to 5.0 (double)

     

"IndicatorAlign"  argument 3 is 0 (left) ,1 (center), 2 (right)

     

"DisplayNumberAlso"  argument 3 is 0 (false) or 1 (true)

     

"IndicatorType"  argument 3 is 0 (none), 1 (percent), 2 (value or text compare)

     

"PercentIs0to1"   argument 3 is 0 (false - assume 0-100) or 1 (true - assume 0-1)

     

"PercentSymbol" argument 3 is 1-64  See Toolbox Symbol Numbering

     

  

     

Up to 10 compare conditions

     

"ConditionNSymbol" argument 3 is 1-64.  See Toolbox Symbol Numbering

     

"ConditionNStatus"        argument 3 is 0 (ignore) or 1 (active)

     

"ConditionNHighValue"     argument 3 is double

     

"ConditionNCompareText"   argument 3 is string (any string here forces text compare and low/high value is ignored)

     

"ConditionNLowValue"      argument 3 is double

     

"ConditionNSymbolColor"   argument 3 is color  See Color Numbering

     

"ConditionNOverlayText"   argument 3 is string

     

“Constant”, argument 3 is  the Value Note that “Constant” is new.  It is used to Set the constant floating point value needed by the Type 5 calculation type.

 

 

             

 

Example: Set up a values column and sets indicator properties.

Sub Setcalculationcolumnproperties(ByVal objmilestones As Object)
        Dim lowval As Double, highval As Double, x As Integer
        Dim date1 As String, date2 As String, strtemp As String
        x = 1
        With objmilestones
            .activate
            .use20columns
            For ncounter = 1 To 20

                .setcolumnproperty(ncounter, "width", 0)

                .setcolumnproperty(ncounter, "SmartColumn", "none")

            Next

            .setcolumnproperty(10, "width", 1)  'Task Column
            .setcolumnproperty(11, "width", 1) 'Values Smartcolumn

            For nCounter = 1 To 7

                strtemp = "This is Task Row " + CStr(nCounter)

                .PutCell(nCounter, 10, strtemp)

                date1 = CStr(nCounter) + "/11/2024"
                date2 = CStr(nCounter + 2) + "/22/2024"

                .AddSymbol(nCounter, date1, 1, 1, 2)
                .AddSymbol(nCounter, date2, 2)

            Next nCounter

            .PutCell(1, 11, "300")
            .PutCell(2, 11, "-300")
            .PutCell(3, 11, "0")
            .PutCell(4, 11, "44")
            .PutCell(5, 11, "22")
            .PutCell(6, 11, "-6")
            .PutCell(7, 11, "0")
            .setlinesperpage(7)
            .setstartandenddates("1/1/2024", "9/22/2024")
            .setcalculationcolumnproperties(11, "type", 3) ' just show the indicator
            .setcalculationcolumnproperties(11, "IndicatorType", 2) ' just show the indicator
            .setcalculationcolumnproperties(11, "DisplayNumberAlso", 0) ' just show the indicator
            .setcolumnproperty(11, "SmartColumn", "values")
            .setcalculationcolumnproperties(11 + x, "type", 3)  'indicator only
            .setcalculationcolumnproperties(11 + x, "indicatortype", 2)  'indicator only
            lowval = -300000000
            highval = -0.05
            .setcolumnproperty(11, "ColumnHeadingLine1", "Calc")
            .setcolumnproperty(11, "ColumnHeadingLine2", "Column")
            .setcalculationcolumnproperties(11, "Condition1Symbol", 25)
            .setcalculationcolumnproperties(11, "Condition1Status", 1)
            .setcalculationcolumnproperties(11, "Condition1LowValue", lowval)
            .setcalculationcolumnproperties(11, "Condition1HighValue", highval)
            '=0
            lowval = -0.01
            highval = 0.01
            .setcalculationcolumnproperties(11, "Condition2Symbol", 27)
            .setcalculationcolumnproperties(11, "Condition2Status", 1)
            .setcalculationcolumnproperties(11, "Condition2LowValue", lowval)
            .setcalculationcolumnproperties(11, "Condition2HighValue", highval)
            '>0
            lowval = 0.05
            highval = 300000000
            .setcalculationcolumnproperties(11, "Condition3Symbol", 29)
            .setcalculationcolumnproperties(11, "Condition3Status", 1)
            .setcalculationcolumnproperties(11, "Condition3LowValue", lowval)
            .setcalculationcolumnproperties(11, "Condition3HighValue", highval)

        End With
    End Sub

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

To effectively program with this interface, it's important to learn all about Milestones Professional.  Learn about Milestones.

Milestones Professional 2025 Automation Methods and Properties.  © Copyright 2000-2025, KIDASA Software, Inc. All rights reserved.