• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk Inventor Customization

    Reply
    Member
    Posts: 5
    Registered: ‎05-24-2010

    Drawing view suppression rule

    182 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
    Please use plain text.
    Active Contributor
    Posts: 33
    Registered: ‎11-07-2008

    Re: Drawing view suppression rule

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

    Hey Eric any luck with this one???

    Please use plain text.
    Mentor
    MegaJerk
    Posts: 194
    Registered: ‎01-26-2011

    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
    --------------------------------------------------------------------------------------
    Please use plain text.