Autodesk Inventor Customization
- Start Article
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Drawing view suppressio n rule
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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
Re: Drawing view suppressio n rule
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hey Eric any luck with this one???
Re: Drawing view suppressio n rule
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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
--------------------------------------------------------------------------------------
