Preprocessing

Preprocessing

Spaceclaim scripting to import parameters from CAD file and select them for use within workbench

Tagged: 

    • UoS_CAE
      Subscriber


      I am trying to import in a solidworks file via scripting feature in Spaceclaim with associated parameters which workbench can use in mechanical for optimisation studies. I can successfully import in the Solidworks geometry via script feature, but I can’t seem to import and select the parameters of interest similar to the capability available with block recording, where the parameters can be selected via a drop down. Can anyone help? Thank you.

      Here is the script i am using currently:

      # Insert From File

      importOptions = WorkbenchSettings()

      importOptions.SolidBodies = True

      importOptions.Parameters = ParameterImport.Independent # similar to block recording

      importOptions.ParameterKey = r"ANS;DS" # similar to block recording

      DocumentInsert.Execute(r"D:SimulationsExample problemSubmodel - solid and shell.SLDPRT", importOptions, GetMaps("0107d617")) # the get maps id is taken from the python recording feature

      # EndBlock

    • Ashish Khemka
      Ansys Employee


      Please see if the following link helps:

      How to Use SpaceClaim Scripting to Parameterize Your Models - Bing video

      Regards Ashish Khemka
Viewing 1 reply thread
  • You must be logged in to reply to this topic.