Hi there,
I highlighted some drawingcurves in a drawing by the API and now I would like to "zoom fit" the highlighted set for a better visual effect. Does anyone known a solution?
greetings Joris
AI 2010, Win 7 64bit
This should work as long as the highlighted set counts as a selection or can be added to the selection set at least.
I formatted it for iLogic, but it's easy to tweak for VBA if needed.
Dim oDoc As AssemblyDocument: oDoc = ThisApplication.ActiveDocument Dim oDef As AssemblyComponentDefinition: oDef = oDoc.ComponentDefinition Dim oOccs As ComponentOccurrences: oOccs = oDef.Occurrences Dim oOcc As ComponentOccurrence: oOcc = oOccs.Item(oOccs.Count) Dim oSSet As SelectSet: oSSet = oDoc.SelectSet Call oSSet.Select(oOcc) Dim oControlDef As ControlDefinition: oControlDef = ThisApplication _ .CommandManager.ControlDefinitions _ .Item("AppZoomSelectCmd") oControlDef.Execute
Unfortunately, I think 'Zoom Selected' only works in the assembly environment and not in the drawing environment.
And when I execute a Control Definition I loose my highlighted set.
greetings Joris
Was there a solution to this? I'm looking to do something similar from a .Net addin.
Sorry to revive an old thread, I found what I needed here http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/Zoom-to-view-in-drawing/m-p/2655306/hi...
Can't find what you're looking for? Ask the community or share your knowledge.