CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Mesh Generation & Pre-Processing Software > ANSA

ANSA_Scripting- Batch mesh assigning visible components

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 29, 2019, 02:20
Default ANSA_Scripting- Batch mesh assigning visible components
  #1
New Member
 
Rakesh kumar
Join Date: May 2019
Location: India
Posts: 4
Rep Power: 3
Rakesh@I is on a distinguished road
# PYTHON script
import
os
import ansa

from ansa import *

deck=constants.ABAQUS


def main():



m1 = batchmesh.GetNewMeshingScenario()

s1 = batchmesh.GetNewSession()


batchmesh.ReadSessionMeshParams(s1,'D:\saved parametrs')

batchmesh.ReadSessionQualityCriteria(s1,'D:\saved parametrs')

batchmesh.AddSessionToMeshingScenario(s1,m1)


status = batchmesh.RunMeshingScenario(s1,30)

print(status)


if __name__ == '__main__':

main()


The above code is not running with error message :m1 = batchmesh.GetNewMeshingScenario() ^ Indentation error:Expected an indented block

AND also i need to add the geometry filter as visible,which is throwing an error for expression.

Please try to help with these few doubts
Rakesh@I is offline   Reply With Quote

Old   March 2, 2020, 04:43
Default IndentationError: expected an indented block
  #2
New Member
 
evanbung
Join Date: Mar 2020
Posts: 1
Rep Power: 0
evanbung is on a distinguished road
Putting in an extra space or leaving one out where it is needed will surely generate an error message . Some common causes of this error include:

Forgetting to indent the statements within a compound statement
Forgetting to indent the statements of a user-defined function.

The error message IndentationError: expected an indented block would seem to indicate that you have an indentation error. It is probably caused by a mix of tabs and spaces. The indentation can be any consistent white space . It is recommended to use 4 spaces for indentation in Python, tabulation or a different number of spaces may work, but it is also known to cause trouble at times. Tabs are a bad idea because they may create different amount if spacing in different editors .
evanbung is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 05:38
Mesh motion with Translation & Rotation Doginal CFX 2 January 12, 2014 06:21
3D Hybrid Mesh Errors DarrenC ANSYS Meshing & Geometry 11 August 5, 2013 06:42
Batch for mesh geometry hasbi CFX 4 February 19, 2013 16:56
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 03:52


All times are GMT -4. The time now is 04:02.