"Publish all IEC symbols ....." CheckBox with script

codesyssk
2016-03-18
2016-03-30
  • codesyssk - 2016-03-18

    Hi all ,

    I am trying to build a Container library using python script with the individual library packages having the "Publish all IEC symbols ..." Property-Option set. But I could not find a method or property in the Python API using which I can check this Checkbox. Any assistance to this Problem would be really helpful. Thanks in advance.

    Regards,

    SK

     
  • mkeller - 2016-03-18

    Hi codesyssk.

    codesyssk hat geschrieben:
    I am trying to build a Container library using python script with the individual library packages having the "Publish all IEC symbols ..." Property-Option set. But I could not find a method or property in the Python API using which I can check this Checkbox. Any assistance to this Problem would be really helpful. Thanks in advance.

    The property of the can be used to access the "Publish all IEC symbols ...".

    An example which prints the libraries in the project:

    def getFullName(obj):
       str = ""
       while obj is not None and not obj.is_root:
          str = obj.get_name() + str
          obj = obj.parent
       return str
    proj = projects.primary
    found = proj.find("Library Manager", True)
    assert(found is not None and len(found) > 0, "no libman found")
    for libMan in found:
       print("Library manager: {}".format(getFullName(libMan)))
       for lib in libMan.references:
          if lib.is_placeholder:
             print("Placeholder: {} => {}".format(lib.name, lib.effective_resolution))
          else:
             print("Lib: {}".format(lib.name))
          print("Publish symbols: {}".format(lib.publish_symbols_in_container))
    

    BR
    Martin

     
  • codesyssk - 2016-03-21

    Hi Martin,

    Thanks for the assistance , it worked without a hitch.

    I have two more questions:

    1.My Container library is connected to the SVN repository (Project contains -"SVN_VERSION_INFO" object)
    During the execution of check_all_pool_objects() I am getting an error: "VAR_GLOBAL not allowed in a Container library".
    Is there a Workaround for this ?.

    2.After I disconnected the Project from the repository, i was able to compile the library without any errors.
    But after I disconnect the Project from the repository can I connect back to an existing repository with URL ?

    BR,

    SK

     
  • mkeller - 2016-03-21

    Hi codesyssk.

    codesyssk hat geschrieben:
    1.My Container library is connected to the SVN repository (Project contains -"SVN_VERSION_INFO" object)
    During the execution of check_all_pool_objects() I am getting an error: "VAR_GLOBAL not allowed in a Container library".
    Is there a Workaround for this ?.

    I talked with my colleague, which is responsible for our libraries and the procedures. A container library should only contain the project information and the library manager. For what reason do you have the VAR_GLOBAL in the container library?

    codesyssk hat geschrieben:
    2.After I disconnected the Project from the repository, i was able to compile the library without any errors.
    But after I disconnect the Project from the repository can I connect back to an existing repository with URL ?

    You can but do you want to do that to work around the "VAR_GLOBAL not allowed in a Container library"?

    BR
    Martin

     
  • codesyssk - 2016-03-21

    Hi Martin,

    Thanks again for your quick reply.

    1. The VAR_GLOBAL CONSTANT is a part of the SVN_VERSION_INFO and not a direct part of my Container library.

    2. How can I connect to an existing repository?. I could not find svn.connect(..) using inspectapi.dir(..) or in F1 help.

    BR,

    SK

     
  • mkeller - 2016-03-21

    Hi SK.

    codesyssk hat geschrieben:
    1. The VAR_GLOBAL CONSTANT is a part of the SVN_VERSION_INFO and not a direct part of my Container library.

    I think nobody checked if the Subversion Integration works for container libraries.

    codesyssk hat geschrieben:
    2. How can I connect to an existing repository?. I could not find svn.connect(..) using inspectapi.dir(..) or in F1 help.

    Sorry, I forgot to check if there is a Scripting API for it.

    At the moment you can only use the following workaround:

    system.commands["svn", "connect"].execute("svn://project/destination/url", "HEAD", "false")
    

    The parameters are:

    1. Absolute URI to the project in the Subversion repository

    2. Revision: HEAD or a numeric revision as string

    3. Omit externals: Boolean

    The improvement to add the necessary API is already listed in our Jira tracker SVN-243, so it will be implemented eventually.

    BR
    Martin

     
  • Anonymous - 2016-03-29

    Originally created by: M.Schaber

    Hi,

    codesyssk hat geschrieben:
    1.My Container library is connected to the SVN repository (Project contains -"SVN_VERSION_INFO" object)
    During the execution of check_all_pool_objects() I am getting an error: "VAR_GLOBAL not allowed in a Container library".
    Is there a Workaround for this ?.

    Our build server first executes an svn disconnect on the project before it further processes and then saves the project as library / compiled library - this shadows the problem in our house.

    Disconnecting the project before publishing it generally makes sense as one should not publish the library to customers when it still contains the SVN working copy information. (The information is generally useless to the user, may introduce a slight information leak, and just bloats the library.)

    SVN-355, so the problem will be fixed eventually.

    HTH,
    Markus

     
  • codesyssk - 2016-03-30

    Hello Martin and Markus,

    The Workaround for the svn connect was exactly what i needed. Thanks a lot.

    Thanks for the update on the svn issue with Container library.

    Best Regards,

    SK

     

Log in to post a comment.