I am trying to automate adding extra notes to hole tables in drawings using API. Does anyone know of a way that I can get the hole wizard feature that corresponds to a given cell in a hole table?
That's a tricky one. The hole table interface shows no useful methods.
My first idea would be to get the annotations, their edge, the two faces that create that edge, then the feature that created the face. I'm doing something similar in my tool to insert fasteners to get to the hole wizard feature from a selected face.
Thanks Peter, I will give that procedure a try. My coding is rather slow so it might be a little while before I get any where.
No need to apologize when you're trying to learn something new
Thanks Peter, that worked well.
Unfortunately I had my cart before the horse. It appears that the description column in hole tables is read only which I was not aware of. So now I can get my data and find where it needs to go, but can not send it there.
It can be edited manually through the properties so it seems strange that it would be so. Perhaps some one has a work around? : )
Can you add a column to your hole table template, then fill it from the macro?
I had thought of that but also need to keep the default notes. So I could hide the original column and copy the displayed text, and then add the rest (or rewrite the hole callout format file in c#). To keep it parametric then would probably require a macro feature, and that would seem to exclude the ability of adding custom notes manually. Losing either option would not be very well excepted by the rest of our design team.
So yes, doable, bit it might cause more problems than I originally set out to solve.
Retrieving data ...