Message 1 of 5
A Question regarding the AddWithOrientation method

Not applicable
04-02-2003
03:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Here's another question from the "old dog" programmer, non-draftsman,
non-mechanical enginer (just so you know where I'm coming from).
This question is asked in the context of VBA code, not interactivly. Is that
always assumed when somebody posts to this particular group?
Anyway...
I'm wanting to "drill" some holes in an object that I just created. I know
(at least I think I know) that in order to do that, I have to create a new
sketch on a face of the object. On this sketch, I need to place the hole
feature at my desired X and Y, then procede from there.
I've been looking at some snippets of code in the Inventor programmers help
screens. This has been very helpful. In the AddWithOrientation method
example, it looks like this:
(blah blah blah).Sketches.AddWithOrientation( oExtrude.EndFaces.Item(1),
_
oPartCompDef.WorkAxes.Item(1), _
True, True, _
oPartCompDef.WorkPoints.Item(1), _
False)
My question is this. What is the Item(1) for? I tried to search for it, but
no luck.
When I look in the help file under EndFaces it shows a sample of code that
refers to EndFaces() without any referece to Item(1). If I understand this
correctly, the StartFaces is my initial sketch plane, the EndFace is the
opposite face (across the object), and SideFace is all others.
Thanks in advance for your help with this.
Eric
...an old dog learning new tricks
non-mechanical enginer (just so you know where I'm coming from).
This question is asked in the context of VBA code, not interactivly. Is that
always assumed when somebody posts to this particular group?
Anyway...
I'm wanting to "drill" some holes in an object that I just created. I know
(at least I think I know) that in order to do that, I have to create a new
sketch on a face of the object. On this sketch, I need to place the hole
feature at my desired X and Y, then procede from there.
I've been looking at some snippets of code in the Inventor programmers help
screens. This has been very helpful. In the AddWithOrientation method
example, it looks like this:
(blah blah blah).Sketches.AddWithOrientation( oExtrude.EndFaces.Item(1),
_
oPartCompDef.WorkAxes.Item(1), _
True, True, _
oPartCompDef.WorkPoints.Item(1), _
False)
My question is this. What is the Item(1) for? I tried to search for it, but
no luck.
When I look in the help file under EndFaces it shows a sample of code that
refers to EndFaces() without any referece to Item(1). If I understand this
correctly, the StartFaces is my initial sketch plane, the EndFace is the
opposite face (across the object), and SideFace is all others.
Thanks in advance for your help with this.
Eric
...an old dog learning new tricks