-
1
- #1
Manuel Pimenta
Mechanical
- Aug 17, 2019
- 11
Hi everyone,
I have a body (called Circuito1 in the images) that is made of several other bodies (let's call them HoleBody) assembled together.
The HoleBody are all identical in structure, since they are copies of each other.
All of them have the same features, parameters and geometrical set inside.
In a section of my code I need to access one HoleBody.
The user selects on the 3D a face of the desired HoleBody, and I need to assign a body variable in VBA to that HoleBody, to do some tasks.
My problem is that I have no simple (and fast) way of accessing the HoleBody entity from the selection value I'm getting.
I have found a way that works, but is slow, especially when there are hundreds of HoleBodies.
What i'm doing:
From selection.value.name I extract the Hole feature name, and then I run a search for that Hole feature.
I tried to access it from selection.value.parent, but this always points to the last assemble in the Circuito1 body, which is not what I want.
Does anyone know of a better way to access a body assembled in another body from a selection?
I have a body (called Circuito1 in the images) that is made of several other bodies (let's call them HoleBody) assembled together.
The HoleBody are all identical in structure, since they are copies of each other.
All of them have the same features, parameters and geometrical set inside.
In a section of my code I need to access one HoleBody.
The user selects on the 3D a face of the desired HoleBody, and I need to assign a body variable in VBA to that HoleBody, to do some tasks.
My problem is that I have no simple (and fast) way of accessing the HoleBody entity from the selection value I'm getting.
I have found a way that works, but is slow, especially when there are hundreds of HoleBodies.
What i'm doing:
From selection.value.name I extract the Hole feature name, and then I run a search for that Hole feature.
I tried to access it from selection.value.parent, but this always points to the last assemble in the Circuito1 body, which is not what I want.
Does anyone know of a better way to access a body assembled in another body from a selection?