Checking assembly components fromout drawing ilogic rule

Checking assembly components fromout drawing ilogic rule

Daan_M
Collaborator Collaborator
575 Views
2 Replies
Message 1 of 3

Checking assembly components fromout drawing ilogic rule

Daan_M
Collaborator
Collaborator

Hi,

 

So i ran into the following; My dwg iLogic places dimensions on my drawing using workpoints.

Sometimes i supress a part in my assembly, in that case i do not want a dimension to be placed to that part, since theres nothing there, E.g.

Daan_M_0-1597393898231.png

Daan_M_1-1597393947702.png

 

to make sure only the active component dimensions are places i tried the following, but without succes;

 

- I wanted to use a if statement checking if the component occurence is active in my assembly, but that doesn't seem possible in drawing document iLogic

 

- I wanted to supress the workpoint in my assembly iLogic so no dimension would be placed in the dwg, but there is no supression option as far as i see

 

Any good solution?

 

 

 

 

0 Likes
576 Views
2 Replies
Replies (2)
Message 2 of 3

WCrihfield
Mentor
Mentor

Perhaps the WorkPoints can be created within the part files or sub-assembly files, then if the WorkPoints are named a certain way, they will get copied into the assembly as WorkPointProxy.  Then maybe if you suppress the part, it will also suppress the source of the WorkPointProxy, which will suppress the WorkPointProxy too.

 

Or, if you remember to turn the visibility of the assembly work point off when you turn the visibility of the part off (or suppress it), then when you go to transfer workpoints to the drawing, check to see if they are visible in the model, before transferring them.

 

The third, and probably most promising, but also somewhat complex option, is to name the faces/edges/vertexes within the part models, then retrieve those entities within your code to identify the geometry you want to attach your dimensions to.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 3

JelteDeJong
Mentor
Mentor

im not sure what you did try. But i think it possible to check if a occurrence is suppressed. have a look at the following code.

Dim dDOc As DrawingDocument = ThisDoc.Document

Dim sheet As Sheet = dDOc.Sheets.Item("Sheet:1")
Dim view As DrawingView = sheet.DrawingViews.Item(1)
Dim assemblyDocument As AssemblyDocument = view.ReferencedDocumentDescriptor.ReferencedDocument

For Each occ As ComponentOccurrence In assemblyDocument.ComponentDefinition.Occurrences
    If ((occ.Name.Equals("??????")) And (occ.Suppressed = True)) Then
        ' Dont make the dimensions in the drawing......
    End If
Next

 

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com