Showing results 1 to 10 of 10

Thread: How do I use Variables?

  1. #1
    Join Date
    23.02.2016
    Posts
    28

    Default How do I use Variables?

    Hi.

    Help is not listed.

    i want using variable.

    For example, I would like to put a value to a variable you created in advance.

  2. #2
    Join Date
    18.07.2011
    Posts
    136

    Default AW: How do I use Variables?

    Hi.

    From your request it is not really clear what you would like to achieve.

    Could you please describe in detail what you are planning to do?

  3. #3
    Join Date
    23.02.2016
    Posts
    28

    Default Re: How do I use Variables?

    I want to control the internal variables.

  4. #4
    Join Date
    08.08.2013
    Posts
    44

    Default Re: How do I use Variables?

    Hi backjahyun,

    in the following zenon help chapter, you get some further Information about the API-function.

    But basically it can be done as the following (of course, just in the runtime):
    this.Variables().Item("myVariableNameOrId").set_Value(0, 11);

    BR
    Christian

  5. #5
    Join Date
    23.02.2016
    Posts
    28

    Default Re: How do I use Variables?

    Thank you very much. Help not only VBA(Variable) examples.

  6. #6
    Join Date
    23.02.2016
    Posts
    28

    Default Re: How do I use Variables?

    Thank you very much.

    my source code apply.

    this.Variables().Item("testint").set_Value(0, 100);

    messagebox show

    ->Back is not possible as there is no screen path yet.

    Why do?

  7. #7

    Default AW: Re: How do I use Variables?

    Hi backjahyun,

    Quote Originally Posted by backjahyun View Post

    ...

    messagebox show

    ->Back is not possible as there is no screen path yet.

    Why do?
    This message box is shown if you want to call a function of the type "Screen: Return to last" and there is no "last" yet.
    It is a function to navigate to the last screen on a specific frame (like an "undo" for screen switch functions)

    BR, Andreas

  8. #8
    Join Date
    23.02.2016
    Posts
    28

    Default Re: How do I use Variables?

    thank you.

    one more question.

    my source code.


    Microsoft.Vbe.Interop.Forms.ComboBox combo;
    public void Macro_Init_CombBox()
    {
    try
    {

    zenOn.IElement zElementActivX = this.Project.DynPictures().Item("Picture_Login").Elements().Item("ActiveX_16");
    as Microsoft.Vbe.Interop.Forms.ComboBox;
    combo = zElementActivX.AktiveX() as Microsoft.Vbe.Interop.Forms.ComboBox;
    //Clear the ComboBox
    combo.Clear();
    //Create Items for the ComboBox
    object[] captions = { "Mayer", "Schmidt", "Huber" };//아래에서 부터 0번재
    object defaultParameter = null;
    //Fill the ComboBox with Items
    int y = 1970;
    int m = 12;
    int d = 31;
    string a= DateTime.Now.ToString("yyyy");
    int lastYear = Convert.ToInt32(a);
    object k = 1970;
    for (y = 1970; y <= lastYear; y++)
    {
    k = y;
    combo.AddItem(ref k, ref defaultParameter);

    }



    }
    catch (Exception ex)
    {
    System.Diagnostics.Debug.Print("ERROR Macro_Init(): "
    + ex.Message + " " + ex.Source);
    }
    }


    how to my combobox current select item check?

  9. #9
    Join Date
    23.02.2016
    Posts
    28

    Default Re: How do I use Variables?

    I cannot find the selected item.

  10. #10
    Join Date
    08.08.2013
    Posts
    44

    Default Re: How do I use Variables?

    Hi,

    in general, you can find lots of information in the Microsoft Developer Network (MSDN).
    In the following link, it is mentioned how you can handle the selected item of a Combobox:
    https://msdn.microsoft.com/en-us/lib...code-snippet-2


    BR
    Christian

Similar Threads

  1. PLC Variables and Internal Variables
    By madphilly in forum Drivers
    Replies: 1
    Last Post: 4th June 2008, 06:59

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •