<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Get path of runtime project</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b16bf3c283/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b16bf3c283/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Visualization/thread/b16bf3c283/</id><updated>2021-06-11T06:03:55.072000Z</updated><subtitle>Recent posts to Get path of runtime project</subtitle><entry><title>Get path of runtime project</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b16bf3c283/?limit=25#ca70" rel="alternate"/><published>2021-06-11T06:03:55.072000Z</published><updated>2021-06-11T06:03:55.072000Z</updated><author><name>m.prestel</name><uri>https://forge.codesys.com/u/mprestel/</uri></author><id>https://forge.codesys.com150a3ab5df91fc4537650f92dfe6266095550eca</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello &lt;a class="user-mention" href="/u/rickj/"&gt;@rickj&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;I think you misunderstand me.&lt;br/&gt;
Only files located in $PlcLogic$/$visu$ will be served by the webserver (I dont know what happens if you use the Runtime Simulation inside CODESYS..)&lt;br/&gt;
If you want to display your custom PDF documentation inside the webvisualization, make sure that you copy this file into $PlcLogic$/$visu$.&lt;/p&gt;
&lt;p&gt;The url for the browser element inside the webvisu should be something like this:&lt;br/&gt;
http://&amp;lt;ip-addr&amp;gt;:8080/&amp;lt;pdf-filename&amp;gt;&amp;lt;/pdf-filename&amp;gt;&amp;lt;/ip-addr&amp;gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Marcel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Get path of runtime project</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b16bf3c283/?limit=25#ac9f" rel="alternate"/><published>2021-06-11T04:19:14.437000Z</published><updated>2021-06-11T04:19:14.437000Z</updated><author><name>rickj</name><uri>https://forge.codesys.com/u/rickj/</uri></author><id>https://forge.codesys.com2257deaea29c9b9976e25be5b39a8a39f9fbd98c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Marcel,&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;VAR_INPUT&lt;/span&gt;
    &lt;span class="n"&gt;Path&lt;/span&gt;        &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;STRING&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;END_VARcode&lt;/span&gt;

&lt;span class="n"&gt;SysFile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SysFileGetPath&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'$$PlcLogic$$/$$visu$$'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="k"&gt;Returns&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'%ProgramData%/CODESYS/Simulation/PlcLogic/visu/'&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Placing "file://%ProgramData%/CODESYS/Simulation/PlcLogic/visu/" into codesys embedded browser URL field displays the following:&lt;/p&gt;
&lt;p&gt;Codesys Embeded Browser:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;Can&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="n"&gt;reach&lt;/span&gt; &lt;span class="n"&gt;this&lt;/span&gt; &lt;span class="n"&gt;page&lt;/span&gt;

&lt;span class="err"&gt;•&lt;/span&gt;&lt;span class="n"&gt;Make&lt;/span&gt; &lt;span class="n"&gt;sure&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;web&lt;/span&gt; &lt;span class="n"&gt;address&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="n"&gt;correct&lt;/span&gt;
&lt;span class="err"&gt;•&lt;/span&gt;&lt;span class="k"&gt;Search&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;this&lt;/span&gt; &lt;span class="n"&gt;site&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="n"&gt;Bing&lt;/span&gt;
&lt;span class="err"&gt;•&lt;/span&gt;&lt;span class="n"&gt;Refresh&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;page&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Placing "file://C:/ProgramData/CODESYS/Simulation/PlcLogic/visu/" into codesys embedded browser URL field displays a directory listign as expected. &lt;/p&gt;
&lt;p&gt;So I am still unable to resolve the placeholder you suggest into a form that can be usaed in the embedded codesys browser.  I don't see how the webserve plays into this at all, since I'm only wishing to display static html files located in the same file sapce as the runtime project.  &lt;/p&gt;
&lt;p&gt;Can you show some example of how to use the placeholder or how to resolve it to a form useable by the embedded browser?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Get path of runtime project</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b16bf3c283/?limit=25#1067" rel="alternate"/><published>2021-06-11T04:19:13.783000Z</published><updated>2021-06-11T04:19:13.783000Z</updated><author><name>rickj</name><uri>https://forge.codesys.com/u/rickj/</uri></author><id>https://forge.codesys.com53d59e9ca493cb648f8011e07b290b71214a96b5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Marcel,&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;VAR_INPUT&lt;/span&gt;
    &lt;span class="n"&gt;Path&lt;/span&gt;        &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;STRING&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;END_VARcode&lt;/span&gt;

&lt;span class="n"&gt;SysFile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SysFileGetPath&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'$$PlcLogic$$/$$visu$$'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="k"&gt;Returns&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'%ProgramData%/CODESYS/Simulation/PlcLogic/visu/'&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Placing "file://%ProgramData%/CODESYS/Simulation/PlcLogic/visu/" into codesys embedded browser URL field displays the following:&lt;/p&gt;
&lt;p&gt;Codesys Embeded Browser:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;Can&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="n"&gt;reach&lt;/span&gt; &lt;span class="n"&gt;this&lt;/span&gt; &lt;span class="n"&gt;page&lt;/span&gt;

&lt;span class="err"&gt;•&lt;/span&gt;&lt;span class="n"&gt;Make&lt;/span&gt; &lt;span class="n"&gt;sure&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;web&lt;/span&gt; &lt;span class="n"&gt;address&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="n"&gt;correct&lt;/span&gt;
&lt;span class="err"&gt;•&lt;/span&gt;&lt;span class="k"&gt;Search&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;this&lt;/span&gt; &lt;span class="n"&gt;site&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="n"&gt;Bing&lt;/span&gt;
&lt;span class="err"&gt;•&lt;/span&gt;&lt;span class="n"&gt;Refresh&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;page&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Placing "file://C:/ProgramData/CODESYS/Simulation/PlcLogic/visu/" into codesys embedded browser URL field displays a directory listign as expected. &lt;/p&gt;
&lt;p&gt;So I am still unable to resolve the placeholder you suggest into a form that can be usaed in the embedded codesys browser.  I don't see how the webserve plays into this at all, since I'm only wishing to display static html files located in the same file sapce as the runtime project.  &lt;/p&gt;
&lt;p&gt;Can you show some example of how to use the placeholder or how to resolve it to a form useable by the embedded browser?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Get path of runtime project</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b16bf3c283/?limit=25#e045" rel="alternate"/><published>2021-06-10T08:22:47.476000Z</published><updated>2021-06-10T08:22:47.476000Z</updated><author><name>m.prestel</name><uri>https://forge.codesys.com/u/mprestel/</uri></author><id>https://forge.codesys.com39cf45b9333e82f0c433b20253e8944d6c948a26</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The webserver will only serve files located in $PlcLogic$/$visu$.&lt;br/&gt;
You cannot access any other files apart from this folder and its subfolder.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Marcel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Get path of runtime project</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b16bf3c283/?limit=25#b22b" rel="alternate"/><published>2021-06-10T08:17:55.523000Z</published><updated>2021-06-10T08:17:55.523000Z</updated><author><name>rickj</name><uri>https://forge.codesys.com/u/rickj/</uri></author><id>https://forge.codesys.com9225cd495b98bc600d70f54f63c0f9c7753bd015</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks Marcel.  I still haven't figured out how to use the placeholder $PlcLogic$/$visu$ but you have given a very helpful about SysFile.  If I embed an external file I can use SysFileGetPath('/App/Filename',Path,80) to get the path where it's stored.   I can then compose a string containing the full path+filename for tyher browser.  For anyone else interested a code snippet below:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;VAR&lt;/span&gt;
    &lt;span class="nt"&gt;Path&lt;/span&gt;            &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;STRING&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="nt"&gt;Filename&lt;/span&gt;        &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;STRING&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="s1"&gt;'Config.csv'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;

&lt;span class="nt"&gt;SysFile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;SysFileGetPath&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;Filename&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;Path&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;80&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>Get path of runtime project</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b16bf3c283/?limit=25#a562" rel="alternate"/><published>2021-06-10T05:30:26.314000Z</published><updated>2021-06-10T05:30:26.314000Z</updated><author><name>m.prestel</name><uri>https://forge.codesys.com/u/mprestel/</uri></author><id>https://forge.codesys.com353a39160023b870ca0e38ba73b316af9a631fd0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;If you are using the webvisu and want to display a file located in $PlcLogic$/$visu$ (same folder where e.g. the webvisu.htm is located), you can simply use the file name.&lt;/p&gt;
&lt;p&gt;SysFile should be able to resolve the placeholder.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Marcel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Get path of runtime project</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b16bf3c283/?limit=25#111b" rel="alternate"/><published>2021-06-07T12:06:17.992000Z</published><updated>2021-06-07T12:06:17.992000Z</updated><author><name>rickj</name><uri>https://forge.codesys.com/u/rickj/</uri></author><id>https://forge.codesys.com14a368a0a4e9890974738ccba81457b54226c89e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;How to get the contents of the placeholders?  Placing them in the visu browser element's URL doesn't seem to work.  Does this only work when executing shell command via windows/linux OS?  I wish to display documents on a visualization screen using the html brwser element.  &lt;/p&gt;
&lt;p&gt;Is there a way to get the placeholder contents into a PLC stgring variable?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Get path of runtime project</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b16bf3c283/?limit=25#9956" rel="alternate"/><published>2021-06-07T05:16:21.016000Z</published><updated>2021-06-07T05:16:21.016000Z</updated><author><name>m.prestel</name><uri>https://forge.codesys.com/u/mprestel/</uri></author><id>https://forge.codesys.com7d96c3a65f6abdbe17e6fdf01c47ddea8bade441</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hey,&lt;br/&gt;
$PlcLogic$/$visu$ is the placeholder to use.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Marcel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Get path of runtime project</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b16bf3c283/?limit=25#b3cb" rel="alternate"/><published>2021-06-06T06:00:16.330000Z</published><updated>2021-06-06T06:00:16.330000Z</updated><author><name>rickj</name><uri>https://forge.codesys.com/u/rickj/</uri></author><id>https://forge.codesys.com6028a3ee47c73859a4b8ff2bf2c9359a9ce3033b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I want to embed HTML and/or PDF doicumentation files into a project and then access them from a visualization screen using the HTML browser component.  Is there a global variable or system function that contains/returns the project's root directory on the tagret runtime?  I know I can poke around with a file manager and emperically find the path but thios is different for simulation builds than for live PLC builds and I suspect it could vary from one vendor PLC to another.  I would like to find a solution that is independent of these variations.&lt;/p&gt;
&lt;p&gt;Thanks in advance for any help.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>