Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Refernce Plot Width and line attributes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Refernce Plot Width and line attributes

    Scenario:
    I draw rays but want to add a plot so the user can define his plot with and line attributes.

    Question
    How do I retrieve/reference these plot values for my draw ray? I can set the values with "Plots[0].Pen.Width" but what is the syntax to reference them?

    Cheers

    #2
    Hello ct,

    Thanks for your post.

    If your end goal is to obtain the users preferences for line width and line style and plot style, you can use properties to allow the user to select them and then can work with the variables in your code.

    For example, to get a line width:

    [Description("Width for MA plot.")]
    [Category("3. MA Plot")]
    [Gui.Design.DisplayNameAttribute("3.Line Width MA")]
    public int Plot0Width
    {
    get { return plot0Width; }
    set { plot0Width = Math.Max(1, value); }
    }


    To get the plot style:

    [Description("PlotStyle for MA plot.")]
    [Category("3. MA Plot")]
    [Gui.Design.DisplayNameAttribute("1.Plot Style MA")]
    public PlotStyle Plot0Style
    {
    get { return plot0Style; }
    set { plot0Style = value; }
    }


    To get the dashstyle:

    [Description("DashStyle for MA plot.")]
    [Category("3. MA Plot")]
    [Gui.Design.DisplayNameAttribute("2.Dash Style")]
    public DashStyle Dash0Style
    {
    get { return dash0Style; }
    set { dash0Style = value; }
    }
    Attached Files

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    39 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    124 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    64 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    41 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X