1 Replies - 716 Views - Last Post: 25 November 2018 - 08:38 PM Rate Topic: -----

#1 Poutouyou   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 22-November 18

[ICON] Problem running a code

Posted 22 November 2018 - 09:07 AM


I am a weaver and I found a code made with ICON that allows to generate draft (weaving pattern) from a drawdown.
This is a draft (the whole thing)
See https://schachtspind..._21/draft-a.jpg
Normally, weaver design pattern from the threading and treadling, then get a tie up. The drawdown is then generated (see this online tool for example: https://weaving.tuyano.com/maker/ [press new pattern) )

It is rather complicated. And I find it easier to draw a drawdown and then get the rest of the draft.
I found a code that allows that. Made with ICON, it uses a drawdown made of binary 1 and 0 to generate the whole draft.
See this explanation to find out how the man made the code: https://www2.cs.ariz...docs/gre_fa.pdf

The code is found at the following: http://www2.cs.arizo...g/FA/dd2wif.icn
I installed Windows version of ICON from official website.
I copied the code and saved it as a .icn file
When I run it, it create an ICON file. When I open it I get a blank black box.

I do not know how it can read the binary drawdown. There is no explanation as to where or how to enter the data it can read. Example data: http://www2.cs.arizo...g/FA/example.dd

I was expecting a space to enter the data or "insert file location here" or something.
I tried having the data as a txt file in same folder as the code. But it did not work.

Normally, the code read the data file and generate a .WIF files (that can be read in any loom weaving software). That WIF file will be the draft.

Thank you for your help. I hope you understood my problem and can help me with it.

Is This A Good Question/Topic? 0
  • +

Replies To: [ICON] Problem running a code

#2 #define   User is offline

  • Duke of Err
  • member icon

Reputation: 1860
  • View blog
  • Posts: 6,698
  • Joined: 19-February 09

Re: [ICON] Problem running a code

Posted 25 November 2018 - 08:38 PM

Hi, welcome.

Looking at the program it uses standard input and standard output (stdin and stdout), i.e. defaults usually set as the keyboard and console window. Normally stdin and stdout can be redirected from and to files.

I downloaded the Icon program and created a dd2wif application.

I created a Command Prompt shortcut (link) in the same folder by dragging the Command Prompt from the Start Menu. Then right-clicked on the Command Prompt shortcut in the folder, selected Properties and deleted the text in the Start In edit box and clicked Apply. By deleting the Start In folder name the Command Prompt window will start in the folder it is in.

I couldn't get the stdin to redirect, but got it to run. I'll step through it.

Open the Command Prompt window.
Type the application name dd2wif, use output redirection operator > and the filename to output to (example.wif), and press enter.
Type the drawdown filename (example.dd), press enter.
Enter Ctrl Z (both held at the same time), then press enter.

dd2wif > example.wif

The output should write to the WIF file.

Hopefully that's a help.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1