Showing results 1 to 2 of 2

Thread: Problematically creating symbols - unique PropSymbolNumber

  1. #1
    Join Date

    Default Problematically creating symbols - unique PropSymbolNumber


    I'm using some code to create linked symbols on a screen & have run afoul of not using unique Symbol numbers (Dynproperty PropSymbolNumber).

    Is there a method to check for existing values? Only way I can think of is to loop through all the symbols on the screen every time to check.

    How does the program handle this natively when a new symbol is placed?

    My other option is to randomise it slightly, but that doesn't guarantee being unique.

    I'm placing objects with VBA on to a screen with existing symbols so I cant just start at a fixed number & increment for each symbol (what happen if the code is run twice for example?).

    Any thoughts anyone?


    Last edited by HMIdeveloper123 : 5th December 2018 at 12:15 Reason: just noticed my title is problematically not programatically... still works :)

  2. #2
    Join Date
    Best Answer

    Default Re: Problematically creating symbols - unique PropSymbolNumber

    Ok, never mind I have realised how to do this.

    Instead of creating a blank symbol using elements.create, I used the .InsertSymbol method instead (it seems to assign a sensible number).

    Set elSymbol = screenScreen.Elements.Create("SYMBOL", tpSymbolLnk)
    Set elSymbol = screenScreen.InsertSymbol("EXAMPLE SYMBOL NAME", "", True)

Similar Threads

  1. Creating all in to PDF
    By Srikanthg in forum zenon Service Engine Supervisor
    Replies: 1
    Last Post: 26th July 2019, 10:20
  2. Nested symbols and VBA
    By Joulzer in forum VBA
    Replies: 0
    Last Post: 8th March 2017, 15:01
  3. Get symbols programmatically
    By cisnetandazo in forum VSTA
    Replies: 1
    Last Post: 17th February 2015, 08:43
  4. $_Parameters of Symbols
    By ilia_romeikov in forum VSTA
    Replies: 2
    Last Post: 26th November 2013, 16:53
  5. Replies: 2
    Last Post: 13th February 2013, 23:07

Tags for this Thread

Posting Rules

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