Inventor Customization

Inventor Customization

Reply
Member
5 Posts
0 Kudos
Registered: ‎05-24-2010
Post 1 of 3

Drawing view suppression rule

241 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
33 Posts
0 Kudos
Registered: ‎11-07-2008
Post 2 of 3

Re: Drawing view suppression rule

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

Hey Eric any luck with this one???

Valued Mentor
286 Posts
187 Kudos
Registered: ‎01-26-2011
Post 3 of 3

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
--------------------------------------------------------------------------------------
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!