Interface: FileLinkMgr
Previously available in Autodesk VIZ, this Core Interface is now part of 3ds Max 7 and higher.
Properties:
FileLinkMgr.numLinks : integer : Read
Returns the number of linked files. Read-only.
Methods:
<boolean>FileLinkMgr.Attach <string>filename fileformat:<enum> showUI:<boolean>
fileformat enums: {#UseFileExt|#DWG|#DXF}
fileformat default value: #UseFileExt
showUI default value: false
Attaches the specified file to the current scene. By default, the file extension of the specified file will determine the file format to be linked.
When the optional showUI
parameter is set to True
, the File Linking dialog will be displayed.
When set to False
or not specified, the linking will be performed silently.
Returns True
on success, False
on failure.
<boolean>FileLinkMgr.AttachWithPreset <string>filename <string>preset showUI:<boolean>
showUI default value: false
Attaches the specified file name using the supplied preset.
When the optional showUI
parameter is set to True
, the File Linking dialog will be displayed.
Returns True
on success, False
on failure.
The preset string is the name of the preset inside <3dsmax>\plugcfg\filelink.ini, not the name of the file itself.
<boolean>FileLinkMgr.Reload <integer>which showUI:<boolean> translateMaterials:<boolean>
showUI default value: false
translateMaterials default value: true
Reloads the specified indexed File Link.
Returns True
on success.
<boolean>FileLinkMgr.Detach <integer>which
Detaches the specified indexed File Link.
Returns True
on success, False
on failure.
<boolean>FileLinkMgr.Bind <integer>which
Removes specified indexed File Link.
Returns True
on success, False
on failure.
<boolean>FileLinkMgr.IsAnyLinked <node array>nodes
Returns True
if any of the specified nodes the supplied array originates from a linked file.
<boolean>FileLinkMgr.IsNodeLinked <node>node
Returns True
if the specified node originates from a linked file. Available in 3ds Max 2017 and higher.
<integer>FileLinkMgr.GetRecord <node>node
Returns the record ID from which the node originates. Available in 3ds Max 2017 and higher.
<IObject>FileLinkMgr.GetRecordFile <integer>which
Returns the record corresponding to the given ID. Available in 3ds Max 2017 and higher.
-- Example:
record = FileLinkMgr.GetRecordFile 0
filename = record.GetFileName()
<void>FileLinkMgr.SetDefaultView <string>viewName
Sets the default view based on the given viewName. Available in 3ds Max 2017 and higher.
-- Example 1 - setting the default view to View1:
FileLinkMgr.SetDefaultView "View1"
FileLinkMgr.AttachWithPreset "path_to_file.ext" "Preset.RevitDoNotCombine"
-- Example 2 - resetting the default view name:
FileLinkMgr.SetDefaultView ""
<boolean>FileLinkMgr.ChangeFilename <integer>which <String>filename
Changes the file name of the specified indexed File Link.
Returns True
on success, False
on failure.
<boolean>FileLinkMgr.SelectNodes <integer>which clearCurrentSel:<boolean>
ClearCurrentSel default value: true
Selects all nodes in the scene associated with specified indexed File Link.
Returns True
on success, False
on failure.