Inventor Customization

Reply
Member
fishernow
Posts: 5
Registered: ‎05-24-2010
Message 1 of 3 (230 Views)

Drawing view suppression rule

230 Views, 2 Replies
05-25-2010 07:21 AM
Hi everyone,

I am stuck trying to find a way to suppress drawing views and drawing sheets. I have a model that consists of several parts and with ilogic in the model, I can suppress the components if i don't need them and that's all good. My drawing consists of several sheets with several views, the suppressed parts are remaining active even though the parts are suppressed in the model.

Q1- Why are the views not turned off or suppressed with the model part suppression?
Q2- When I try to use ilogic to suppress a view or the sheets I get the errors below.

Drawing view suppression rule:

If Parameter("105088 Shelves & Dividers Assembly.iam.s2sp2") = 0 Then
ActiveSheet.View("VIEW12") = False
End If

Rule Compile Errors in viewoff, in 105088 Shelves & Dividers Assembly.idw
Error on Line 2 : Property 'View' is 'ReadOnly'.

****************************************************************************************
Sheet suppression rule:

If Parameter("105088 Shelves & Dividers Assembly.iam.s2sp2") = 0 Then
ActiveSheet = ThisDrawing.Sheet("Sheet DP Shelf 1&2 :2") = False

End If

Rule Compile Errors in viewoff, in 105088 Shelves & Dividers Assembly.idw
Error on Line 2 : Operator '=' is not defined for types 'Autodesk.iLogic.Interfaces.ICadDrawingSheet' and 'Boolean'.

************************************
Drawing parameter rule:

If Suppress_Sheets = True Then
ActiveSheet.View("VIEW1") = False
End If

Rule Compile Errors in Rule2, in 105088 Shelves & Dividers Assembly.idw
Error on Line 2 : Property 'View' is 'ReadOnly'.

Thanks,
Eric
Active Contributor
montylowe
Posts: 33
Registered: ‎11-07-2008
Message 2 of 3 (154 Views)

Re: Drawing view suppression rule

04-13-2011 08:28 AM in reply to: fishernow

Hey Eric any luck with this one???

Mentor
MegaJerk
Posts: 265
Registered: ‎01-26-2011
Message 3 of 3 (150 Views)

Re: Drawing view suppression rule

04-13-2011 09:59 AM in reply to: fishernow

Use something like this:

 

 

ThisDrawing.Sheet("Sheet:2").View("Part1").View.Suppressed = False

Now if you’re throwing your representations on to a sheet (no matter if they are flat patterns or isometric who knows what) they will have a view name that you give them on creation. You can see what this view name is (AKA: View Identifier) when you double click on them (Right click à Edit View), and look at the bottom.

 

In the case above, I am looking at a View Identifier called Part1 on the sheet called Sheet.

 

Note that when you change the View name of your representation, you will need to update the rule to follow that!

 

Note 2: ALSO please look at the wording of the above code! See how it’s asking if the state is suppressed unlike how it states the suppressed (IsActive) state for the assembly. The above code is saying that it’s NOT suppressed. 

--------------------------------------------------------------------------------------

If my solution seems to remedy your problem, please press the Accept Solution button, -
as it increases my power levels and will eventually help to elevate me towards outer space.

Check out my iLogic injection tool here : http://goo.gl/ce1Qg
--------------------------------------------------------------------------------------

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube