Can we select sketcht lines in iLogic ?

Can we select sketcht lines in iLogic ?

talha_ozdemir
Advocate Advocate
208 Views
1 Reply
Message 1 of 2

Can we select sketcht lines in iLogic ?

talha_ozdemir
Advocate
Advocate

Hello everyone.

I want to ask if we can select the sketch lines in iLogic as we do in parts. Here are 2 screenshots to you to better understand the question.  On the first picture there is a part that I can select on iLogic. On the second picture there is the line which I want to select in ilogic. I just want to now if there is a way to select a line in iLogic, and use some rules on it. 

Screenshot 2022-08-19 145702.png

Screenshot 2022-08-19 145433.png

  

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

WCrihfield
Mentor
Mentor

Hi @talha_ozdemir.  Your question is pretty vague, and difficult to understand or answer as it is.  Inventor's API, which iLogic works with, has an object structure that it must work with, and usually has to start at the top of that object structure, and work its way down to objects below.  Well, sketch lines are several steps down within that structure, so it takes more code to get down to them.

Below is a very basic and generic example of selecting the first sketch line, within the first sketch, within the component definition of a part or assembly document.

oDoc = ThisDoc.Document
oDocType = oDoc.DocumentType
If oDocType <> kPartDocumentObject And oDocType <> kAssemblyDocumentObject Then Return
Dim oSketches As PlanarSketches = oDoc.ComponentDefinition.Sketches
Dim oSketch As PlanarSketch = oSketches.Item(1)
Dim oSketchLine As SketchLine = oSketch.SketchLines.Item(1)
oDoc.SelectSet.Clear
oDoc.SelectSet.Select(oSketchLine)

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes