Greetings everyone,
I've been climbing all over the forums trying to piece together a way to go about creating leader notes on a drawing for this dynamic crate generator that I've been putting together, and I've hit a brick wall. I've got a dynamic crate generator assembly model that uses a form to allow the user to customize various aspects of the crate's design. It's composed entirely of iParts, so this has presented quite a challenge in setting up a macro to auto-populate the shop drawing.
Most of the examples and forum posts that I've seen thus far have dealt with either starting the leader creation process with a highlighted edge on a model view, or they've been based around the task of creating a drawing for a single part. Of the few posts that were centered around assemblies, they relied on having the individual parts containing some element that was used to specify which edge a leader note should attach to. But since I'm working with iParts, this makes it overly complicated to attempt this approach retrospectively.
The view that I need to create these leader notes for is always an isometric view. Due to the wide range in which this crate model can change, however, I'd like to program some intelligence into how leaders notes are created. I can take care of that once I get to that point, but first I just need to get leaders to appear in the first place. Below are some screenshots of the isometric view in question; these images show what I'd like to accomplish using the API.


I'm struggling to find a way to generate a leader notes that are actually attached to the individual iParts that they're identifying; I need the leader notes to call out the iParts' Part Numbers, which are drawn from their iProperties. I've figured out a way to generate a leader note in a similar manner to how many people have posted about how they go about auto-populating a drawing with dimensions - via the creation of hidden center marks. I've placed work points in my assembly model at the locations where I'd like the leader notes to be attached, but this doesn't solve my problem entirely. The macro-generated leader notes that I've created in this fashion aren't connected to the iParts; they're attached to the hidden center marks, which were generated from work points. See the image below:


I admit to being new to using Inventor's API feature, so I've had to learn a lot of information over a short period of time. It's also been a long time since I've programmed anything in C++, so it's been a rough time getting back into the swing of things. What I'm hoping for is some guidance on how to go about addressing my particular situation in a (hopefully) minimally-painful manner. It'd also help me out a lot if I could maybe get a block of example code to get me started, as I've been growing rather disheartened as I attempt to trouble-shoot my way to a working solution. I dislike going about things the "code monkey" way, but my lack of experience has left me with no other options.
What are your thoughts on this kind of problem, and how would you guys go about addressing it? Perhaps a new perspective will refresh the way I'm looking at my situation and approach it from an angle I didn't think of yet. Thanks in advance for any guidance you guys can offer. I hope to hear from you soon. 😃
- Sincerely,
Vinny