Hi @inventor4578. I am sorry to hear that the code I posted is not working as planned for you. I tested it several times on different assembly drawings, and it worked every time for me. The new view of the selected part is placed at the lower left corner of the active sheet, and is often pretty small, due to using the same scale as the view of the main assembly. One of the biggest challenges of this task is that the DrawingCurve.ModelGeometry property just returns a single generic Object type value, and even that could be Nothing, if the model was not available. When 'something' is actually returned, some code has to be used to figure out what type of object it is first, before it can move forward. Then there must be an entire block of code just for each potential type of object that it might be, because every type of object has different properties, and the code needs to use those properties to find its way up the Inventor API object model to a Document from that object. That path of code needs to be different for each type of object. The most common 2 types of objects that a DrawingCurve.ModelGeometry might return are either an Edge, or an EdgeProxy, so those are the only 2 types of objects that my code example tests for right now. It could also return things like geometry belonging to model sketches, or model work features, if you have included any of that type of stuff in your view. If you do, then the code would need to be expanded to include testing for those types of objects, then also be expanded more to include blocks of code which are specific to those individual types of objects which try to get to a parent Document object from them. Those types of expansions could be added with more time and effort invested into this project.
From the Logger entries that you posted, it looks to me like the 'model' document was returned, and it did attempt to make a view so it did find either an Edge or EdgeProxy. Did it throw an error when it tried to create the view? One requirement for making a new view in a drawing is that the 'model' that the new view is to reference must be open first (not necessarily visibly open, just open). And generally, all documents being referenced by the drawing should already be open (automatically, in the background, not necessarily visible). Maybe of that model was suppressed or something like that, it would not be open, but I don't know how you would be able to select something that was suppressed. Are you sure it is not actually adding a view, because it might possibly be tiny, depending on the parts size and the scale of the view, and down near the lower left corner of the sheet (may be outside of the border)?
Wesley Crihfield

(Not an Autodesk Employee)