Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Iam able to extract text from symbols and detail notes by getting a handle of notes/symbol using the following code,
modelitems = detailItemOwner.ListDetailItems(EpfcDetailType.EpfcDETAIL_NOTE, 1)
Now i need to extract Dimension Texts from a drawing.
the modeItems that are returning from the above code does not contain dimension texts
Any idea on how to extract those informations?
Solved! Go to Solution.
Found the solution myself
For anyone else having the same problem. here you go
For m = 0 To session.ListModels.Count - 1
model = session.ListModels.Item(m)
Dim ModType As Integer = model.Type
If model.Type = 1 Or model.Type = 0 Then
MIowner = CType(model, IpfcModelItemOwner)
MIs = MIowner.ListItems(EpfcModelItemType.EpfcITEM_DIMENSION)
For i = 0 To MIs.Count - 1
dimension = MIs.Item(i)
dimensions = dimension
shXL.Cells(J, 1) = dimensions.Symbol
shXL.Cells(J, 2) = dimensions.DimValue.ToString
shXL.Cells(J, 3) = model.FileName
Dim texts As Cstringseq = dimensions.Texts
For t = 0 To texts.Count - 1
str = str & texts.Item(t)
Next
shXL.Cells(J, 4) = str
J = J + 1
End Try
Next
End If
Next
Found the solution myself
For anyone else having the same problem. here you go
For m = 0 To session.ListModels.Count - 1
model = session.ListModels.Item(m)
Dim ModType As Integer = model.Type
If model.Type = 1 Or model.Type = 0 Then
MIowner = CType(model, IpfcModelItemOwner)
MIs = MIowner.ListItems(EpfcModelItemType.EpfcITEM_DIMENSION)
For i = 0 To MIs.Count - 1
dimension = MIs.Item(i)
dimensions = dimension
shXL.Cells(J, 1) = dimensions.Symbol
shXL.Cells(J, 2) = dimensions.DimValue.ToString
shXL.Cells(J, 3) = model.FileName
Dim texts As Cstringseq = dimensions.Texts
For t = 0 To texts.Count - 1
str = str & texts.Item(t)
Next
shXL.Cells(J, 4) = str
J = J + 1
End Try
Next
End If
Next