what version of autocad? I turned off filedia, and it loaded w/o asking me to overwrite, it just did it
I'm using 2008,2007,2006,2004.
The asking to overwrite happens to me when there is an existing linetype of the same name.
Thisdrawing.setvariable "EXPERT", 3
That would explain it, indeed.
Luis I wouldn't know where to start with both vba and c#, it's like you have to purge it then bring in the new one, lots of trouble.
I don't think that many drafter's in the U.S. know the difference between acadiso.lin and acad.lin so I'm not too upset about it, I wonder if it is mentioned in a typical cad standards contract.
In case this happens to someone else, the following (in conjunction w/ a folder function) seems to work.
Sub ChangeLinetypes()
Dim L As AcadLineType
Dim Ls As AcadLineTypes
Dim sName As String
Dim sPath As String
Dim sCommand As String
ThisDrawing.SetVariable "filedia", 0
ThisDrawing.SetVariable "celtscale", 1
ThisDrawing.SetVariable "PSLTSCALE", 1
ThisDrawing.SendCommand "insunits 4 "
sPath = "C:\Documents and Settings\Your handle\Application Data\Autodesk\AutoCAD Mechanical 2008\R17.1\enu\Support\acadiso.lin"
sCommand = "-linetype l "
Set Ls = ThisDrawing.Linetypes
For Each L In Ls
sName = L.Name
If InStr(1, sName, "|", vbTextCompare) <> 0 Then GoTo skip
Select Case sName
Case "ByBlock", "ByLayer", "Continuous"
GoTo skip
End Select
sCommand = "-linetype l " & sName & vbCr & vbCr & "y "
ThisDrawing.SendCommand sCommand
esc
esc
esc
skip:
Next
esc
esc
ThisDrawing.SetVariable "filedia", 1
End Sub