PScripting-find an edge between a lot of parts
PScripting-find an edge between a lot of parts
(OP)
For the ABAQUS Experts out there,
I have written a python script that generate some edges and faces and assembled them as independed instances. I want to find a instance by findAt(x,y,z). So I used below code as abaqus documentation to create an EdgeArray to be able to search between them:
EDGES=mdb.models['Model-1'].rootAssembly.allinstances.edges
but got an error as this:
AttributeError: 'Assembly' object has no attribute 'allinstances'
I tried allinstances by capital I (allInstances) as below:
EDGES=mdb.models['Model-1'].rootAssembly.allInstances.edges
and the error was:
AttributeError: 'Repository' object has no attribute 'edges'
in another try I used:
EDGES=mdb.models['Model-1'].rootAssembly.edges
however there is no error in this situation, but the array of EDGE is empty; is there any suggestion????
I have written a python script that generate some edges and faces and assembled them as independed instances. I want to find a instance by findAt(x,y,z). So I used below code as abaqus documentation to create an EdgeArray to be able to search between them:
EDGES=mdb.models['Model-1'].rootAssembly.allinstances.edges
but got an error as this:
AttributeError: 'Assembly' object has no attribute 'allinstances'
I tried allinstances by capital I (allInstances) as below:
EDGES=mdb.models['Model-1'].rootAssembly.allInstances.edges
and the error was:
AttributeError: 'Repository' object has no attribute 'edges'
in another try I used:
EDGES=mdb.models['Model-1'].rootAssembly.edges
however there is no error in this situation, but the array of EDGE is empty; is there any suggestion????





RE: PScripting-find an edge between a lot of parts
RE: PScripting-find an edge between a lot of parts
Actually I have a lot of instances as wire. I'm trying to find any wire instances along path and between two vertices. However the method that you said before is working, but looping all instances to find an instance by findAt() and using a point middle of two vertices, is really time consuming. in other hand, if the line between two vertices included of instances more than one, it returns just one of them. is there any better method or idea??
RE: PScripting-find an edge between a lot of parts
When multiple lines might be found, then you can check the outcome of each findAt() (maybe with len()) and append the instancename to a previously created list.
RE: PScripting-find an edge between a lot of parts
RE: PScripting-find an edge between a lot of parts