Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extent open schematic from CLI #973

Open
2 tasks
njascgil opened this issue Sep 29, 2024 · 7 comments
Open
2 tasks

Extent open schematic from CLI #973

njascgil opened this issue Sep 29, 2024 · 7 comments

Comments

@njascgil
Copy link

njascgil commented Sep 29, 2024

Using the "-i" parameter I am not able to open files from the command line. Qucs-s opens fine, but with the default empty document (latest continuous build).
At first I though it might have something to do with spaces in the path, but it does not work even if I open a cmd prompt inside the qucs-s.exe folder and copy the sch file also to this location (then trying "qucs-s.exe -i pl1.sch").
Is this a real issue or am I doing something wrong?

TODO list

  • Allow to load schematic containing incompatible devices in CLI mode
  • Use qucs-s schematic.sch to open file from CLI; the -i option should not be required
@ra3xdh
Copy link
Owner

ra3xdh commented Sep 29, 2024

I cannot reproduce this. The qucs-s -i schematic.sch opens a document on my machine. Probably you may have $PATH issues on Windows. Try to specify the full path to file.

@njascgil
Copy link
Author

I think I may have found the issue, but perhaps it's by design.
When the default simulator is Qucsator (e.g. by closing Qucs-s with that simulator selected in the toolbar), opening a sch via the command line works just fine. If the default is Ngspice instead, Qucs-s starts with the default "untitled" empty sheet.
(I found it after running Qucs-s inside a VM and comparing the registry entries for both cases. DefaultSimulator=0x08 is ok, but DefaultSimulator=0x01 is not...)

@ra3xdh
Copy link
Owner

ra3xdh commented Sep 29, 2024

Sorry, I still cannot reproduce this. The Qucs-S opens schematic from CLI using both Qucsator and Ngspice modes.

@ra3xdh
Copy link
Owner

ra3xdh commented Sep 29, 2024

The exception is when schematic contains SPICE-incompatible or Qucsator-incompatible device. It shows an empty schematic and prints in the console message like this:

Critical: "Schematic loading error! Unknown device K_SPICE"

@njascgil
Copy link
Author

That may be it. When I remove the (old) Qucs transformer from my model the sch opens just fine either way.
However, I do not see that message when trying to open the sch containing the Spice incompatible file...

@ra3xdh
Copy link
Owner

ra3xdh commented Sep 29, 2024

Maybe Windows redirects the stderr stream and you don't see the error messages in CLI.

@ra3xdh
Copy link
Owner

ra3xdh commented Sep 29, 2024

I have added TODO list for this issue. The first task is to allow to load schematic with incompatible devices from CLI. The CLI options to load schematic needs a bit redesign. The -i option should not be required. The syntax should be qucs-s schematic.sch as used by all applications. This will allow to associate SCH files to Qucs-S by system tools.

@ra3xdh ra3xdh changed the title Not able to open files from the command line Extent open schematic from CLI Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants