VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Verify if exists AcadLineType

1 REPLY 1
Reply
Message 1 of 2
Anonymous
144 Views, 1 Reply

Verify if exists AcadLineType

Hello,

I've this code to verify if each Linetype Exists in acad.lin to create a layer.
I need to verify in two files (acad.lin and userlines.lin), how can i do that?

******************************************
LineTypeExists = False
For Each LineType In ThisDrawing.Linetypes
If UCase(LineType.Name) = UCase(TargetLineType) Then
LineTypeExists = True
Exit For
End If
Next LineType

If Not LineTypeExists Then
ThisDrawing.Linetypes.Load TargetLineType, "acad.lin"
End If
************************************

Best regards,
Antonio Miranda
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

Hello, I've this code to verify if each Linetype Exists in acad.lin to create a layer.
I need to verify in two files (acad.lin and userlines.lin), how can i do that? ******************************************
LineTypeExists = False

For Each LineType In ThisDrawing.Linetypes

If UCase(LineType.Name) = UCase(TargetLineType) Then
LineTypeExists = True
Exit For
End If

Next LineType

If Not LineTypeExists Then
ThisDrawing.Linetypes.Load TargetLineType, "acad.lin"
End If
************************************
Best regards,
Antonio Miranda

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost