Is there any ways to get a picture of outline from a .knwf file through a program?

Hi everyone,

I want to get a picture about the outline by program.
Is there any ways to get a picture of outline from a .knwf file through a program?

Kind regards,
YoGa

Hi @YoGa

if you have the svg extension installed, there will be a picture as SVG of the workflow inside.
For this rename the knwf file to zip. Unzip it and the file is called workflow.svg.

Cheers, Iris

Hi @Iris

I had install SVG Support and restared KNIM,but I have no idea what to do to get it.
Can you explain more details?

Kind regards,
YoGa


image

Hi @Iris

I know where to find the option about " export to svg" ,
thanks very much!

Kind regards,
YoGa

You need to export your workflow. via File -> Export KNIME Workflow
This is how you get a knwf file.
This you need to rename.

Hi @Iris

I have another question.
Is there any command to use this function?

Kind regards,
YoGa

How do you mean command? to export the workflow?

Just like the cmd command or shell command,
to use the function about “export to SVG”.

There is no function to generate the workflow svg.
But as soon as the package is installed all workflow have it always up to date in the workflow folder. And from this you could just copy it.

Hi @Iris,

I do not understand what that means about “copy it”.
And,If I use KNIME in linux,and I can only use command line.There is no way to get the workflow svg?

Kind regards,
YoGa

Hi @YoGa -

If you navigate to the folder where the workflow lives on your file system, you should see a workflow.svg file. I use Windows, so the directory is something like C:/Users/Scott/knime-workspace/MyWorkFlow/workflow.svg. Of course your directory will be different, but you get the idea.

Hi @ScottF

I try your way to get my workflow.svg. But there is nothing named workflow.svg in my diretory.
By the way,my KNIME’s version is 3.5.3 in my windows system.

Now I am trying to get a svg picture in linux by using XXX.knwf file wthout opening KNIME Analytics Platform.But I have no idea how to do that.

Could you help me?

Kind regards,
YoGa

Hi @YoGa -

Can you confirm that you have the KNIME SVG Support extension installed on both your Windows and Linux machines? If you have it installed, I believe you should see an SVG file as indicated after you save a workflow.

As for KNWF files, they are just zip archives of the directory where your workflow resides. You can treat them as you would any zip file - in linux you can use the unzip command to uncompress or view the contents.

Hi @ScottF

Thank you very much ! It works !
I new a new workflow, and save it.Then I could find the workflow.svg in my workflow file .
Thanks again.

Kind regards,
YoGa

Great! Glad to hear it.

Hi @ScottF

If my .knwf file does not have workflow.svg before, will it be created after excuting .knwf in linux?
I try many times , it could not be created.
So,I think the .knwf file must have workflow.svg before it be excuted. Right?

Kind regards,
YoGa

No.

The SVG package needs to be installed before the export of the workflow.
You cannot manually generate the image afterwards.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.