FileName Example

Using Programming Languages other than VBA

Sub Example_FileName()
	'This example reads information from a File Dependency List
	
	ThisDrawing.Application.Documents.Open ("c:\program files\autocad\sample\city map.dwg")
	ThisDrawing.Application.ZoomAll

	Dim objFDLCol As AutoCAD.AcadFileDependencies
	Dim objFDL As AutoCAD.AcadFileDependency

	Set objFDLCol = ThisDrawing.FileDependencies
	MsgBox ("The number of entries in the File Dependency List is " & objFDLCol.Count & ".")
	
	Dim strTemp As String
	For Each objFDL In objFDLCol
		strTemp = "Affects graphics?: " & vbTab & objFDL.AffectsGraphics
		strTemp = strTemp & vbCrLf & "Feature: " & vbTab & objFDL.Feature
		strTemp = strTemp & vbCrLf & "FileName: " & vbTab & objFDL.FileName
		strTemp = strTemp & vbCrLf & "FileSize: " & vbTab & objFDL.FileSize
		strTemp = strTemp & vbCrLf & "Fingerprint GUID: " & vbTab & objFDL.FingerprintGuid
		strTemp = strTemp & vbCrLf & "FoundPath: " & vbTab & objFDL.FoundPath
		strTemp = strTemp & vbCrLf & "FullFileName: " & vbTab & objFDL.FullFileName
		strTemp = strTemp & vbCrLf & "Index: " & vbTab & objFDL.Index
		strTemp = strTemp & vbCrLf & "Modified?: " & vbTab & objFDL.IsModified
		strTemp = strTemp & vbCrLf & "ReferenceCount: " & vbTab & objFDL.ReferenceCount
		strTemp = strTemp & vbCrLf & "Timestamp: " & vbTab & objFDL.TimeStamp
		strTemp = strTemp & vbCrLf & "Version GUID: " & vbTab & objFDL.VersionGuid
		MsgBox strTemp
	Next
End Sub

 

   Comments?