I found out something about drawings and assemblies a few days ago.
And I’ve been thinking about it ever since.
It seems that drawings are just assemblies underneath the hood.
It makes a great deal of sense, when you combine all the hints that we found.
For our drawing automation add-in Drew, we work on drawings a lot. We are continuously looking for ways to optimize, streamline and automate the drawing process for our users.
Now I was checking out buttons in SOLIDWORKS that I rarely use, and I found this nifty feature:
This button allows you to actually rotate a drawing view in 3D, like this:
This means that a drawing view is actually just a side view of the 3D model. I had no idea!
Very cool, right? My mind was already blown at this moment.
And then I kept thinking about it.
When you program for SOLIDWORKS like we do here at CAD Booster, you can get the first view of the current sheet using the GetFirstView method. But that first view is not an actual view, it’s the sheet.
This behavior made no sense to me, until now.
It just means that the sheet is added as the first object to a sheet and the first view is the second object. This gray rectangle can never be deleted. You can delete the sheet format, but the sheet size will remain.
You also cannot change the rotation of this view object using code. I tried and failed. I would have loved to show you a rotated sheet format, but SOLIDWORKS prevents changing the angle apparently.
I am still not 100% sure about this one, but these are my reasons for thinking that a sheet is actually a configuration:
So my conclusion is that SOLIDWORKS adds a component to the drawing/assembly for each view. It then suppresses all views that are not on the current sheet and hides them in the feature tree.
For this one, I created a drawing with two sheets and a number of views. Notice how the view models are numbered with <number>, exactly how SOLIDWORKS names identical components in an assembly.
You see the same naming pattern when you hide a component (left) or a body (right) using a right click on a drawing view, the clicking Properties.
I had a hunch that this one might be true, so it was very cool to find proof for it. I wanted to know what would happen if you create a sketch within a drawing view, the rotate that view in 3D.
The image below shows what happened. You add a sketch with a rectangle (left), then rotate it (middle). HA! The sketch actually rotates along with the view. When you click Ok, SolidWorks then changes the sketch back to its previous orientation (as shown on the right).
The strangest thing is the plane that is used for the sketch. The view is a top view, so I expected it to use the top view of the assembly. But it actually uses the top plane from the first component within that assembly, which makes no sense at all.
So when we know that …
That also means that…
Try rotating a parent view using the 3D rotation button. SolidWorks will then ask you if the child views should be rotated as well. What it’s basically asking is: “Should I keep the distance mate between origins and the three parallel mates between the planes?”
Once again, I am amazed. How can you show only certain parts of an assembly and hide the rest? By throwing in a cut-extrude of course! Just set it to remove everything outside of the sketch contour.
I tried to let SOLIDWORKS proof this to me by creating a cropped view, then trying to rotate it. But then this popup decides to stop me in my tracks.
Damn it. I mean this one:
This does improve the chance that I am right though, because rotating the view would show the cut-extrude. It also means that all these views use similar tricks:
Empty views are the exception probably. It would just be hard to calculate which objects to rotate around which point.
First of all, I just really wanted to share this info with you all. I think the information that drawings are actually assemblies is way too cool to keep it for myself. But I also think it has some practical purposes:
You have a better understanding of what SOLIDWORKS does under the hood, so you can handle accordingly. If you are working on a drawing for a slow assembly, you might think twice about adding another broken out section or a cropped view.
It also means that nearly every trick in the book for speeding up large assemblies will also speed up large drawings. That is a massive insight! We already wrote pieces on Assembly Best Practices and How to speed up slow drawings, so I will update those posts accordingly.
I would love to know your insights into this subject. How does it change the way you work with drawings and/or assemblies? Let me know in the comments of our LinkedIn post.