


{"id":438756,"date":"2025-08-07T01:14:34","date_gmt":"2025-08-07T01:14:34","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/use-scripting-api-to-set-source-and-analysis-time-steps-for-imported-displacemen\/"},"modified":"2025-08-08T14:37:19","modified_gmt":"2025-08-08T14:37:19","slug":"use-scripting-api-to-set-source-and-analysis-time-steps-for-imported-displacemen","status":"answered","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/use-scripting-api-to-set-source-and-analysis-time-steps-for-imported-displacemen\/","title":{"rendered":"Use scripting API to set source and analysis time steps for Imported Displacemen"},"content":{"rendered":"<p>&lt;p&gt;Essentially, I am trying to automate the creation and definition of a Cut Boundary Constraint for a submodel.&nbsp; This is using the ironPython in the console embedded in Mechanical.&nbsp; With the Macro Recorder I have figured most of it out.&nbsp; However, I cannot figure out how to access this worksheet that comes for specifying the &#8220;Source TIme&#8221; property.&nbsp; &nbsp;Neither the Ansys.ACT.Automation.Mechanical.ImportedLoads.ImportedLoadGroup object, or Ansys.ACT.Automation.Mechanical.ImportedLoads.ImportedDisplacement object, have an input\/output property that I am used to filling our tabular loads.&nbsp;&nbsp;&lt;\/p&gt;&lt;p&gt;Can anyone assist?&nbsp; Here is what I have so far:&lt;\/p&gt;<\/p>\n<pre>analysis = Model.Analyses[0]&lt;br&gt;&lt;br&gt;analysis.AnalysisSettings.NumberOfSteps = 2&lt;br&gt;analysis.AnalysisSettings.LargeDeflection = False&lt;br&gt;&lt;br&gt;iload = analysis.AddImportedLoadResultFile()&lt;br&gt;iload.ResultFile = r'path\\to\\source\\file.rst'&lt;br&gt;icut = iload.AddImportedCutBoundaryConstraint()&lt;br&gt;# Set scoping method to Named Selection&lt;br&gt;icut.PropertyByName('GeometryDefineBy').InternalValue = 1 &nbsp;&lt;br&gt;# Set to BC faces&lt;br&gt;icut.PropertyByName('ComponentSelection').InternalValue = NamedSelection.ObjectID # Assume I have defined a Named Selection<\/pre>\n<p>&lt;p&gt;<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2025\/08\/07-08-2025-1754529035-mceclip0.png\" \/>&lt;\/p&gt;&lt;p&gt;&nbsp;&lt;\/p&gt;<\/p>\n","protected":false},"template":"","class_list":["post-438756","topic","type-topic","status-answered","hentry","topic-tag-ACTAnsysACTAnsys-1","topic-tag-ironpython"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_forum_id":["27791"],"_bbp_topic_id":["438756"],"_bbp_subscription":["242545","170445"],"_bbp_author_ip":["38.122.49.84"],"_bbp_last_reply_id":["438904"],"_bbp_last_active_id":["438904"],"_bbp_last_active_time":["2025-08-08 20:01:57"],"_bbp_reply_count":["3"],"_bbp_reply_count_hidden":["0"],"_bbp_voice_count":["2"],"_bbp_engagement":["242545","170445"],"_btv_view_count":["177"],"_bbp_topic_status":["answered"],"_edit_last":["242545"],"_bbp_revision_log":["a:1:{i:438757;a:2:{s:6:\"author\";i:242545;s:6:\"reason\";s:10:\"formatting\";}}"],"_edit_lock":["1754592626:242545"]},"test":"1bbfcae10069933aa6acb3dfd123ef93dff8c46f"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/438756","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/438756\/revisions"}],"predecessor-version":[{"id":438757,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/438756\/revisions\/438757"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=438756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}