09-27-2018
01:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-27-2018
01:57 AM
Try below iLogic code to count number of custom line type ("ACAD_ISO02W100").
Dim oDoc As Document = ThisApplication.ActiveDocument
Dim oSketch As Sketch
oSketch = oDoc.ComponentDefinition.Sketches.Item(1)
'Dim linesCount As Integer
linesCount = 0 ' ******* must be a parameter *******
Dim oName As String
Dim oDesc As String
Dim i As Double
For i = 1 To oSketch.SketchLines.Count
If oSketch.SketchLines.Item(i).LineType.ToString = "kCustomLineType" ' "ACAD_ISO02W100" needed
Call oSketch.SketchLines.Item(i).GetCustomLineType(oName, oDesc)
If oName = "ACAD_ISO02W100" Then
linesCount = linesCount + 1
End If
End If
Next i
Thanks and regards,
CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network
