By "Creating", do you mean using VBA code dynamically to create a line type file (*.lin) from nothing and then load it into AutoCAD, or just load a line type from an existing *.lin?
I'd assume it is the latter. So, look into AcadLineTypes.Load(<linet type name>, <*.lin file name>). There is code examples in Acad VAB help.
Norman Yuan
I need to create layer with line type.
How to create through vba.
Thanks
shan
Something like:
Dim myLayer As AcadLayer
Set myLayer=ThisDrawing.Layers.Add("MyLayer")
myLayer.LineType="Continuous" '(or other line type name)
...
'Set other layer properties
...
Of course, myLayer.LineType can only be set to a name of line type that has been loaded. If you set it to the name of a line type that has not been loaded (i.e. line type defined outside acad.lin), you have to make sure the corresponding *.lin file is loaded. You can examine ThisDrawing.LineTypes to find out what line types has been loaded. If the target line type is not there, you then use ThisDrawing.LineTypes.Load() to load the *.lin file that contains the target line type definition.
HTH
Norman Yuan