mika3049
Materials
- Nov 4, 2016
- 17
Hi,
I need to write a python comman code to find a node (in a given set), nearest to a given point.
The code now looks as follows:
import sys
sys.path.insert(10,
r'c:/SIMULIA/Abaqus/6.13-3/code/python/lib/abaqus_plugins/findNearestNode')
import nearestNodeModule
nearestNodeModule.hideTextAndArrow()
a = mdb.models['FibreModel'].rootAssembly
n1 = a.instances['Fibre0-1'].nodes
pickedSelectedNodes = n1[0:599]
g=nearestNodeModule.findNearestNode(xcoord=101, ycoord=106, zcoord=58, name='', selectedNodes=pickedSelectedNodes, instanceName="'Fibre2-1'")
ct=g[0]
And I get an error:
File "SMAPyaModules\SMAPyaPluginsPy.m\src\abaqus_plugin s\findNearestNode\nearestNodeModule.py", line 71, in findNearestNode
AttributeError: 'NoneType' object has no attribute 'instances'
Does anyone know what is wrong there?
Leon
I need to write a python comman code to find a node (in a given set), nearest to a given point.
The code now looks as follows:
import sys
sys.path.insert(10,
r'c:/SIMULIA/Abaqus/6.13-3/code/python/lib/abaqus_plugins/findNearestNode')
import nearestNodeModule
nearestNodeModule.hideTextAndArrow()
a = mdb.models['FibreModel'].rootAssembly
n1 = a.instances['Fibre0-1'].nodes
pickedSelectedNodes = n1[0:599]
g=nearestNodeModule.findNearestNode(xcoord=101, ycoord=106, zcoord=58, name='', selectedNodes=pickedSelectedNodes, instanceName="'Fibre2-1'")
ct=g[0]
And I get an error:
File "SMAPyaModules\SMAPyaPluginsPy.m\src\abaqus_plugin s\findNearestNode\nearestNodeModule.py", line 71, in findNearestNode
AttributeError: 'NoneType' object has no attribute 'instances'
Does anyone know what is wrong there?
Leon