3D Design

3D Design

Topics related to Ansys Discovery and Ansys SpaceClaim.

Space claim scripting FileSetting problem

    • Shyam Prasad V Atri
      Subscriber

      Hey

      I am trying to import multiple curves but I keep getting this error 

      name 'FileSettings1' is not defined
      Stack Trace:
      Document:"New Script (1)", Line:4

      So what happens is if I import one curve once and then I put the rest of the curve in the script then it will execute. but if I open a fresh file and try to import a new curve just by running the script I get this error. please let me know how to get away from this

    • Atharv Joshi
      Forum Moderator
      Hi Shyam, 
       
      Let me check this and get back to you. 
       
      Regards
      Atharv
    • Atharv Joshi
      Forum Moderator

      You can import the geometry using the following method. 
      Use DocumentOpen method and specify the file name and path.

      For eg:
      importOptions = ImportOptions.Create()
      DocumentOpen.Execute(r"C:\TEST_CURVE.scdoc", importOptions)

      Regards
      Atharv
    • Atharv Joshi
      Forum Moderator

      I think you have used Smart Variable selection to record the script for importing the files. 
      Smart variables such as 'FileSettings1' is not pre-defined in a new session so you can face errors.
      You can switch to index selection based approach to record the initial code and later modify as required. 

      Regards
      Atharv
Viewing 3 reply threads
  • The topic ‘Space claim scripting FileSetting problem’ is closed to new replies.