Tutorial 1: Running FEBio from the command line on Windows

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • smits
    Junior Member
    • Nov 2011
    • 2

    #31
    When I enter -i for anything I always get the same response. "unkown command: -i" Any suggestions on how to fix this?
    Taylor

    Comment

    • maas
      Lead Code Developer
      • Nov 2007
      • 3400

      #32
      Taylor,

      If you are trying to run a file from the febio prompt, you simply type

      Code:
      run -i file.feb
      You can also run the file immediately when you start febio from the command (or shell) prompt.

      Code:
      >febio -i file.feb
      Give this a try and let us know if you have any further problems.

      Cheers,

      Steve.
      Department of Bioengineering, University of Utah
      Scientific Computing and Imaging institute, University of Utah

      Comment

      • smits
        Junior Member
        • Nov 2011
        • 2

        #33
        Thanks for your help, but I am still getting fatal error "Element 1 has an invalid material type." I imported a stl file into into preview and set a material to it, so I am not sure why I am getting the error. Am I supposed to do it differently?

        Thanks again,

        Taylor

        Comment

        • maas
          Lead Code Developer
          • Nov 2007
          • 3400

          #34
          Aha, I see. I think the FEBio command line parser has some problems understanding the quotes. I'll see if I can fix that shortly. In the mean time, you may have to run the file from another folder, so that you don't have spaces in the name and thus no need for quotes.

          Cheers,

          Steve.
          Department of Bioengineering, University of Utah
          Scientific Computing and Imaging institute, University of Utah

          Comment

          • BEstudent
            Junior Member
            • Apr 2012
            • 2

            #35
            Hi,

            First of all: great job with the preview, febio and postview programs. I am, however, wondering if there is a possibility to run febio in matlab, in stead of cmd?

            Cheers,

            Tim

            Comment

            • maas
              Lead Code Developer
              • Nov 2007
              • 3400

              #36
              Hi Tim,

              Currently there is not. However, we are working on a new version of FEBio that will allow us to interface with other programming languages such as Python and Matlab. The development of this version is still in its early stages so it may be a while before it is available. It's difficult to say how long precisly, but I hope to have a beta-release ready by the end of the year.

              Cheers,

              Steve.
              Department of Bioengineering, University of Utah
              Scientific Computing and Imaging institute, University of Utah

              Comment

              • Namal
                Junior Member
                • Apr 2012
                • 16

                #37
                Hello,

                Is "PATH"variable is under "user variables" or "System variables ". My OS is Windows 7 and i find it in the system variables with simple letter like "path"? .. Will this has an influence on calling FEBio form command prompt ?. Thanks a lot !

                Namal

                Comment

                • maas
                  Lead Code Developer
                  • Nov 2007
                  • 3400

                  #38
                  Hi Namal,

                  I believe that if you define the PATH variable under user variables, then it will only by used for the user that is logged in. If you place it in system variables, the variable is set for all users. I recommend setting it under the user variables. If it is not defined yet, you'll have to add it. If it is defined, make sure you append the FEBio path and not replace the current value of the PATH variable. Hope this helps.

                  Cheers,

                  Steve.
                  Department of Bioengineering, University of Utah
                  Scientific Computing and Imaging institute, University of Utah

                  Comment

                  • Namal
                    Junior Member
                    • Apr 2012
                    • 16

                    #39
                    Hi steve,

                    Thanks. Have another question. When i run an input file i get an error msg "Failed creating log file". What could be the reason. I used an input file (name is bp04.feb) from the Example folder. Thanks.

                    Namal

                    Comment

                    • Namal
                      Junior Member
                      • Apr 2012
                      • 16

                      #40
                      Steve,

                      i figured it out. I just copied the whole folder "Febio1p4" to 'my documents' folder and did the run.
                      But it is interesting even if i delete the PATH which i included earlier according to your comment still the file do run ? ... And why is that ? ... So it is not necessary to include the PATH in to the local variables ? ... i am confused now.

                      Any comments, please ?

                      Namal

                      Comment

                      • maas
                        Lead Code Developer
                        • Nov 2007
                        • 3400

                        #41
                        Hi Namal,

                        The reason why you have to add the FEBio folder to the PATH variable, is because this will allow you to run FEBio from the command prompt and from any folder. FEBio is installed in the Program Files (x86) folder. By default, Win7 does not allow a program to create files in the installation folder (for security reasons). I am guessing you placed your FEBio input file in the installation folder and then tried to run FEBio. And that's why you got the error message that FEBio cannot create the log file. To get around this, I propose the following workflow:

                        - Install FEBio in the default folder (Program Files (x86)).
                        - Add the installation folder to the PATH variable.
                        - Place your input files somewhere in your MyDocuments folder.
                        - Open a command prompt and cd to your input file folder.
                        - Use the command febio -i filename.feb to run the input file.

                        This is what most people do, including myself and I have gotten quite used to it. I understand that in modern times this seems a bit archaic, and if it is any consulation, know that we are working on a GUI-featured version of FEBio. But until that version is ready, I recommend the approach described above. Hope this answers your question.

                        Cheers,

                        Steve.
                        Department of Bioengineering, University of Utah
                        Scientific Computing and Imaging institute, University of Utah

                        Comment

                        • Namal
                          Junior Member
                          • Apr 2012
                          • 16

                          #42
                          Thanks a lot for your help steve. I am good with executing FEBio inputs from command prompt now.

                          Namal

                          Comment

                          • michalacadova
                            Member
                            • Jan 2010
                            • 80

                            #43
                            Hi,
                            It was once already here – is there now a way how to run FEBio from Matlab?


                            Thanks
                            Michala

                            Comment

                            Working...
                            X
                            😀
                            😂
                            🥰
                            😘
                            🤢
                            😎
                            😞
                            😡
                            👍
                            👎