I am trying to center an exploded view on a drawing sheet through an API. However when i get the outline of the view it gives me the outline of the collapsed view, not the exploded view.
The drawing view is inserted and in the exploded state when i call swView.GetOutline
I am looking for some code like this?
swView.GetExplodedOutline
Thanks
SolidworksApi macros
Check this message
https://forum.solidworks.com/message/386347#comment-386347
I can make the drawing with the views without any problem. But i am trying to center my exploded view on the sheet. When i call getOutline it gives me the outline of the collapsed view not the exploded view.
I had this problem before. Set the view at 0,0, get the size, explode the view then get the difference width and height difference and use that to center the view. The coordinate will be that of the view collapsed.
Hi Eric,
Following codes works fine for me. I can get outline of both exploded and collapsed view. Run the macro two times. First with the collapsed view and then with the exploded view. The drawing view must be selected before running the macro. IView.Postion always returns position of the collapsed view as mentioned.
Are you creating exploded view manually or through API?
Regards,
There you go. Problem solved!
Yes I got it figured out thanks everyone!