I have hit a roadblock and I'm hopeful someone can help me with my problem.
What I am trying to accomplish is to insert an image (specifically of a Data Matrix) in the lower left corner of a drawing for all drawings in the assembly. I am getting attribute values and using them to create to Data Matrix image. Once the image is created it is inserted on the drawing and can later be read by a scanner. I was able to do this without any problems when I was testing it out on a single drawing.
Now that I have everything working I want to have the program recusively iterate through an assembly file and insert the image for each drawing sheet that meets my criteria. When I have done something similar in the past I would use "child.prototype.owningpart" to access the component but I'm not sure how that would work in this situation.
I think to accomplish this I need to make the current part in the recursion routine the displayed part, add the image to each sheet, then move on to the next part.
Any help with this would be appreciated.
You will need a reference to the part file, which you can get with the code in your first post.
for each comp in assembly dim compPart as part = comp.prototype.OwningPart for each sheet in compPart.DrawingSheets 'do stuff next next