Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Solidworks API - Is view empty

Status
Not open for further replies.

NirVidP

Industrial
May 10, 2010
45
Using Solidworks API, how can I find a drawing view is empty?

Same is the case with Sketch object.

I have searched the help file but can't find anything relevant.
 
Replies continue below

Recommended for you

I don't know how to do it in API, but this is an empty view.
empty_jhiyuq.jpg


Chris, CSWP
SolidWorks '20
ctophers home
SolidWorks Legion
 
First you need to get the view object. Usually done by traversing views with GetFirstView and GetNextView. Then see if RootDrawingComponent or GetCorresponding come back empty.
 
Hello, thanks for your replies.

I am not a regular / experience SolidWorks user.

I spent some time on my problem and realized that I had unnecessarily tried to generalize the problem.

Here is more specific problem.

The sheet view can contain annotations or even geometry. So I wanted to check if the sheet view had any of such objects.
The RootDrawingComponent represents the model connected to view, hence it will always be nothing for sheet or Custom view even if they contain objects.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor