[Al...] Posted May 27, 2023 Share Posted May 27, 2023 Hello everybody, I’m new in piweb world and I’ve a question. I would like to open a pdf file in a specific directory. To do this, I thought to using a hyperlink associated to the drawing number in the report header. In my archive, we have a lot of sub-directorys named with dwg number and inside we have the drawing in pdf format. The name of drawing is the part number, the same number which can find in the report header. Today I tried to do that but the only result is opening the main directory 🙄 piweb don’t found the pdf file. Please, help me 😐 Link to comment Share on other sites More sharing options...
[Da...] Posted June 1, 2023 Share Posted June 1, 2023 Hi Alessio, try to use a "Folder view" command, you found it into Table&Directories Menu Link to comment Share on other sites More sharing options...
[Jo...] Posted June 2, 2023 Share Posted June 2, 2023 Hello, Here is some information with a few examples that will hopefully help. In the first example I used a button (can really be any element though with a defined hyperlink) with a fixed path just to make sure you know how to open a .pdf. Steps to reproduce: 1. Add a button 2. Under properties for the button, add a hyperlink action to open a file 3. Define a fixed file path, in my example C:\temp\Test.pdf 4. Preview in PiWeb Monitor to check to see if it works In a second example, I am using a button with a more generalized approach. In this example I am using a print number that is a part attribute and combining it with two text strings to build the file path. Steps to reproduce: 1. Add a button 2. Under properties for the button, add a hyperlink action to open a file 3. Define the first part of your file path. For the first part of the string in my example C:\\temp\\ I am using a double backslash "\\" because a single backslash "\" in a PiWeb expression will escape the expression itself. For the second part of the string I used the variable ${Qdb.Part(1041)} which is where my print number is defined, in this example it is defined as "Test" For the third part of the string I used .pdf 5. Add databinding to the button (in this case it is bound to the part) 6. Preview in PiWeb Monitor to check to see if it worksFixed String.PNGPrint Number as Variable.PNG Link to comment Share on other sites More sharing options...
[Al...] Posted June 2, 2023 Author Share Posted June 2, 2023 Ok, thanks a lot. Monday I will try this way. What is databinding? In my expression I used a variable which contain the drawing number but don’t work it. For you is because I don’t use the databinding function? How it that work? Please sign in to view this quote. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in