CreateEntry Method

Creates a new entry in the File Dependency List.

See Also | Example


object.CreateEntry (Feature, FullFileName, AffectsGraphics, noIncrement)


The object or objects this method applies to.


String; input-only
Description of the application or feature creating the entry.


String; input-only
Name of the file to be stored in the File Dependency List (must be an existing file).


Boolean; input-only
True means that the entry affects the on-screen view of the drawing file, specifically the graphics cache; false means it does not affect the on-screen view.


Boolean; input-only
True does not increment the reference count on existing entries; false increments the reference count when an existing entry is added.


This method takes a string indicating a feature description. The string is stored with the File Dependency List (FDL) entry and identifies the application or feature that created this entry, such as Acad::xref. No unique-application-name checking is done on the feature string. This method also takes a parameter to indicate the name of the file stored in the FDL, and the stored path, if any, can be included. If no path is included, AutoCAD searches for the file in the current directory and the AutoCAD support file search path, and the found is stored with the entry. If the file cannot be found or if it cannot be opened, no entry is created and 0 is returned. If the file is found, its time/date and file size are stored with the entry, and a unique index is assigned to the entry and is returned.

You can use this method to recreate a set of entries by setting noIncrement to True. This prevents the increment of the reference count when an entry already is in the FDL. If noIncrement is set to False, then the same entry can be added multiple times. In this case, the reference count is incremented for the entry to record the number of times the entry is referenced in the FDL. Duplicate records are never created.