SetLegendProperty

 

Purpose: Set a property for a Legend .

 

Argument  

Type

Required

Purpose

1

integer

Yes

Legend Property

Property

Parameter 2

"ClearLegend"

Arg 2 and Arg 3 should be zero.  Will clear the legend of all legend entries.

"Color"

Overrides the color for the starting symbol of specified legend entry.  Use -1 to reset to the default color, or choose a new color  (See color numbering) To use this option, argument 3 must be used to specify which legend entry is being set.

"ConnectorColorOverride"

Overrides the color for the horizontal connector of specified legend entry.To use this option, argument 3 must be used to specify which legend entry is being set. (see About Color numbering and RGB Color )

"EntriesPerRow"

The # of entries

"Frame"

0=no frame, 1=frame

"Gap"

A background color   see About Color numbering and RGB Color

"SymbolSize"

A symbol size from 0.1 to 5.0

 

0 or 1 where 0 means no gap

"Symbol1ColorOverride"

Overrides the color for the starting symbol of specified legend entry.  Use -1 to reset to the default color.  To use this option, argument 3 must be used to specify which legend entry is being set.  see About Color numbering and RGB Color

"Symbol2ColorOverride"

Overrides the color for the ending symbol of specified legend entry.  Use -1 to reset to the default color. To use this option, argument 3 must be used to specify which legend entry is being set.  see About Color numbering and RGB Color

2

Variant

   

3

Integer

   

 

 

             

 

Example: Clear the legend entries (if any) and set up a new legend with 3 entries

 
.SetLegendHeight(1)

.SetFontStyle (22, 2, 12,rgb(0,0,255)) 'blue, italic and bold, 12 point font
.setlegendproperty("clearlegend", 0)
.setlegendproperty("entriesperrow", 3)
.SetLegendSymbology(1, 1, 1, 1) ' summary
.SetLegendText(1, "Summary", "")
.SetLegendText(2, "Planned", "")
.SetLegendText(3, "Critical", "")
.SetLegendSymbology(2, 3, 2, 3) 'planned
.SetLegendSymbology(3, 5, 3, 5) 'critical

 

The legend is stored with the template. The easiest way to set up a legend is using the GUI and then using a template with a program that manipulates the schedule.

 

 

 

 

Related Topics

  1. GetLegendProperty
  2. SetLegendHeight
  3. SetLegendSymbology
  4. SetLegendText

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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.