ilogic in file .idw - sketches in floor view

ilogic in file .idw - sketches in floor view

Anonymous
Not applicable
279 Views
1 Reply
Message 1 of 2

ilogic in file .idw - sketches in floor view

Anonymous
Not applicable

Hi everyone,

I have question about ilogic-command in file .idw

When I do drawing my assembly I need ilogic rule which turn on sketches of them assemblies.
These sketches has the same names "ZNACKA".
WHY? Because I do floor view and for example socket has own typical symbol.
So I have made symbols in sketches which I turn on when I do drawing (floor view)

---
Now I must find these parts and assemblies in main assembly and each turn on separately.
First I must find assemblies or parts (where is sketch with name "ZNACKA") I must press GET MODEL SKETCHES (then is visible in "fiber" of part/assembly).
and then I must press INCLUDE on sketch.

It means that I need this operation automaticly.

 

Who will help me?

0 Likes
280 Views
1 Reply
Reply (1)
Message 2 of 2

WCrihfield
Mentor
Mentor

Would this iLogic rule work for you?

It loops through each sheet in the drawing, then each view in each sheet, then loops through all the sketches within that views model, and when its name = "ZNACKA", it sets it to be Included in its parent view.

 

Dim oDDoc As DrawingDocument = ThisDrawing.Document
Dim oSheet As Sheet
Dim oView As DrawingView
Dim oSketches As PlanarSketches
Dim oSketch As PlanarSketch
For Each oSheet In oDDoc.Sheets
	For Each oView In oSheet.DrawingViews
		oSketches = oView.ReferencedDocumentDescriptor.ReferencedDocument.ComponentDefinition.Sketches
		For Each oSketch In oSketches
			If oSketch.Name.Contains("ZNACKA") Then
				oView.SetIncludeStatus(oSketch, True)
			End If
		Next
	Next
Next

 

I hope this helps.
If this solves your problem, or answers your questions, please click 'Accept As Solution".
Or, if this helps you reach your goal, please click 'LIKES" 👍.

 

Also, if you're interested, here are a few of the 'Ideas' I'd like to get implemented.
If you agree with any of them, please vote for them.

  • Add more capabilities to the 'Customize' dialog box (exe. Add Tab & Add Panel) Click Here
  • Constrain & Dimension Images In Assembly Sketches & Drawing Sketches (TitleBlocks & SketchedSymbols) Click Here
  • Save Section View Status In DesignViewRepresentation (So It Can Be Used In The Drawing) Click Here
  • Add SolidBodies Folder In iLogic Rule Editor Model Tab Click Here
  • Convert All Views To Raster Before Autosave Stores To 'OldVersions' Folder Click Here
  • SetDesignViewRepresentation - Fix limitations for DrawingView of a Part Click Here
  • Create DocumentSubTypeEnum Click Here
  • Add kRevisionTag or kDrawingRevisionTag to ObjectTypeEnum Click Here

Inventor 2020 Help | Inventor Forum | Inventor Customization Forum | Inventor Ideas Forum

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes