Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Sub MakeStdLayer()
Dim myLayer As AcadLayer, myLineType As AcadLineType
Dim vColor As Variant, vLineType As Variant
Dim sName As String
Dim bFound As Boolean
sName = "OBJ"
vColor = acGreen
vLineType = "Continuous"
'Verify that the Linetype is loaded
For Each myLineType In ThisDrawing.Linetypes
If myLineType.Name Like CStr(vLineType) Then
bFound = True
Exit For
End If
Next myLineType
If bFound = False Then ThisDrawing.Linetypes.Load vLineType, "acad.lin"
'Create the Layer
Set myLayer = ThisDrawing.Layers.Add(sName)
myLayer.Color = vColor
myLayer.Linetype = vLineType
myLayer.Lineweight = acLnWtByLwDefault
'Clean Up Objects
Set myLayer = Nothing
Set myLineType = Nothing
End Sub