Creation and optimization of custom library

alebrije
2022-02-09
2022-02-10
  • alebrije - 2022-02-09

    Hello everyone,

    I am working right now creating a new library, and I want it to be a state of the art one, here I describe my problems:
    I want to add an image to each fb, and I was reading the reStructuredText Directives so, wen my Fb is out of all my folders, I can use the directive image without a problem... see Photo 1. https://docutils.sourceforge.io/docs/ref/rst/directives.html#image
    But as soon I move my fb inside a subfolder, I cannot access the image anymore, and i got this weird link... see photo 2.
    Can somebody tell me how is suppose to be the structure so I can manage all my Fb in folders and still have access to the images?
    I'm sure is something about the syntax, but I just donΒ΄t get it :(

    I posted the same issue 2 days ago in the engineering Topic but nobody answers

    I highly appreciate all your post and comments
    Regards!

     
  • sgronchi - 2022-02-10

    Try to add some "../", I guess that "../../../../Images/Keypad.png" will work ;-)

     
  • alebrije - 2022-02-10

    Hello sgronchi,

    Thank you so much it works!... but i wanted to clarify:
    There is only the possibility to add 2 times "../" so at the end my solution was:
    // .. image:: ../../Images/Keypad.png
    //

    and my keypad function is in Library/Libname/FunctionBlock/Devices/Keypad/FB_Keypad.

    I hope this post help people working with custom libraries!

    Best regards!

     

Log in to post a comment.