Showing results 1 to 7 of 7

Thread: How to access linked symbol sub elements

  1. #1

    Idee How to access linked symbol sub elements

    Hi to all,

    I'm searching for a way to dynamically access sub elements of a linked symbol instance inside a picture.

    In particular I need to search for the Function dynproperty inside a particular subitem of a linked symbol.

    I'm able to know the LinkedName, SubstituteDestination, SubstituteSource, but not a way to go inside the Linked Symbol.

    All of this inside a custom ZenOn wizard.

  2. #2
    Join Date
    19.10.2010
    Posts
    14

    Default Re: How to access linked symbol sub elements

    Hi Carlo,

    If you mean that you want to access the properties of a symbol which is inside another symbol, pheraps you could try by exposing its properties so you can access them in the same way you access the properties of the external symbol that you instance in the picture.

    But in our experience this works only if the inside symbol is embedded, not linked.

    Bye,
    Fabio

  3. #3

    Default Re: How to access linked symbol sub elements

    Quote Originally Posted by fabio79 View Post
    Hi Carlo,

    If you mean that you want to access the properties of a symbol which is inside another symbol, pheraps you could try by exposing its properties so you can access them in the same way you access the properties of the external symbol that you instance in the picture.

    But in our experience this works only if the inside symbol is embedded, not linked.

    Bye,
    Fabio
    Hi Fabio,
    I mean to go inside the sub elements of a linked symbol (an instance of a symbol present in the list you find inside Pictures tree)


    If zElem.Type = tpSymbolLnk Then ' linked symbol 
        Dim sourcePattern, destPattern As String
        
        sourcePattern = Mid(zElem.DynProperties("SubstituteSource"), 1 + InStr(zElem.DynProperties("SubstituteSource"), "*"))
        destPattern = zElem.DynProperties("SubstituteDestination")
    
        ' Here I want to explore the properties of symbols that are inside
        ' this linked symbol instance, because I need to find a match of something
    
    End If


  4. #4
    Join Date
    19.10.2010
    Posts
    14

    Default Re: How to access linked symbol sub elements

    Hi Carlo,
    when you write sub element of a linked symbol I understand you are talking about a symbol A that you have put inside your linked symbol B.
    If so, first be sure that on symbol A you expose the property you need to access later (let's call it "prop_symbol_A") and than make its istance "embedded" (= not linked to the original symbol A) inside the symbol B.

    Now, if you parse all the properties available for the symbol B, you should see the property "prop_symbol_A" together with the properties of the symbol B (just like it belongs to symbol B):

    vProperties = zElem.DynPropertiesEnum("")
    For i = 0 To UBound(vProperties)
        Debug.Print vProperties (i)    'stampa nella finestra Immediata
    Next it

    So you should be able to access the property in the usual way

    zElem.DynProperties("prop_symbol_A") = ..

    I am just beginning practising with those issues so I hope I gave you the right info.
    If not, let's hope some moderator will correct me!

  5. #5

    Default Re: How to access linked symbol sub elements

    Hi,

    You may want to have a look at the VBA source code of some of the default wizards that are delivered with zenon for inspiration and / or examples.

    The language change wizards or the documentation wizard may be a good place to start.

    Best regards,
    Mark

  6. #6

    Default Re: How to access linked symbol sub elements

    Yes Mark, my wizard has to say thanx to copadata default wizards, I know them very well but the is only an example of symbols of type tpSymbol, not tpSymbolLnk (value 130).

    Maybe I missed something around. There is also the frmSymbol wizard that treat tpSymbolLnk type but it seems not to be useful for my tasks.

    But it keep on reading something around, maybe I'll find the solution.


  7. #7
    Join Date
    29.07.2007
    Location
    Parma (Italy)
    Posts
    12

    Blinzeln Re: How to access linked symbol sub elements

    Ciao Carlo,
    perhaps you can discuss of this problem with Nicola (not your desk colleague), that examined a lot how to expose and use Library sub-element property.

    See you

    Quote Originally Posted by carlo.chiari View Post
    Yes Mark, my wizard has to say thanx to copadata default wizards, I know them very well but the is only an example of symbols of type tpSymbol, not tpSymbolLnk (value 130).

    Maybe I missed something around. There is also the frmSymbol wizard that treat tpSymbolLnk type but it seems not to be useful for my tasks.

    But it keep on reading something around, maybe I'll find the solution.

Similar Threads

  1. Symbol rotieren lassen
    By zero in forum zenon Supervisor
    Replies: 10
    Last Post: 10th July 2012, 10:38
  2. Search Variables & linked Objects
    By derda in forum zenon Supervisor
    Replies: 1
    Last Post: 3rd February 2011, 00:36
  3. alarm symbol
    By lunzer in forum zenon Supervisor
    Replies: 3
    Last Post: 22nd July 2009, 14:37
  4. Symbol drehen...
    By alice18 in forum zenon Supervisor
    Replies: 1
    Last Post: 15th January 2009, 16:45

Posting Rules

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