Interface: ATSOps

A Core Interface providing access to the Asset Tracking System. Available in 3ds Max 8 and higher.

Interface: ATSOps

Properties:

.Visible : bool : Read|Write

Get/set the visibility of the Asset Tracking dialog.

.Silent : bool : Read|Write

Get/set the silent mode of the Asset Tracking dialog.

.Disabled : bool : Read|Write

Enable/disable asset tracking. Corresponds to the Options>Disable Asset Tracking menu item in the Asset Tracking dialog.

.AutoLogin : bool : Read|Write

Enable/disable auto-login. Corresponds to the Options>Auto Login menu item in the Asset Tracking dialog.

.TreeView : bool : Read|Write

Enable/disable tree view display. Corresponds to the Options>Tree View menu item in the Asset Tracking dialog. If in table view and the .TreeView property has been set to true, the .TableView property will be set to false automatically.

.TableView : bool : Read|Write

Enable/disable table view display. Corresponds to the Options>Table View menu item in the Asset Tracking dialog. If in tree view and the .TableView property has been set to true, the .TreeView property will be set to false automatically.

.DisplayExcluded : bool : Read|Write

Enable/disable the display of exclused files. Corresponds to the Options>Display Excluded Files item in the Asset Tracking dialog.

.ExcludeOutputFiles : bool : Read|Write

Enable/disable the exclusion of output files. Corresponds to the Options>Exclude Output Files item in the Asset Tracking dialog.

.CheckNetworkPaths : bool : Read|Write

new.gif NEW in 3ds Max 9: Enable/disable the checking of network paths.

Methods:

<integer>NumFilesSelected()

Returns the number of selected files.

<integer>GetSelectedFiles <&string array>FileList

FileList is In and Out parameter

Returns the selected files into the by-reference FileList array.

<integer>NumFiles()

Returns the total number of files.

<integer>GetFiles <&string array>FileList

FileList is In and Out parameter

Returns all files into the by-reference FileList array.

<integer>GetDependentFiles <string>Filename <bool>Recurse <&string array>FileList

FileList is In and Out parameter

Returns the dependent files of the specified filename into the by-reference FileList array. If the Recurse boolean parameter is set to true, also recourses through all collected files, collecting their dependent files too.

<void>SelectFiles <&string array>FileList

FileList is In and Out parameter

Selects the files specified by the by-reference FileList array.

<void>ClearSelection()

Clears the selection.

<void>Refresh()

Refreshes the Asset Tracking dialog.

<void>ShowPromptsDialog()

Opens the Prompts dialog.

<void>ShowWorkingCommentDialog()

Opens the Working Comment dialog. Corresponds to the File>Working Comment... option in the Asset Tracking dialog's menu.

<void>ShowStatusLogDialog()

Opens the Asset Tracking Log dialog.

<integer>NumProviders()

Returns the number of providers.

<string>GetProviderName <index>ProviderIndex

Returns the name of the indexed provider as string. If the index is less than 1 and higher than the number of available providers, returns undefined.

<index>GetActiveProvider()

Returns the index of the active provider. If the index is less than 1 and higher than the number of available providers, returns undefined.

<void>SetActiveProvider <index>ProviderIndex

Sets the the active provider to the indexed provider.

<void>Login <index>ProviderIndex

Logs in the indexed provider. Corresponds to the Server>Log in... option in the Asset Tracking dialog's menu.

<void>Logout <index>ProviderIndex

Logs out the indexed provider. Corresponds to the Server>Log out option in the Asset Tracking dialog's menu.

<bool>IsFileExcluded <index>ProviderIndex <string>Filename

Returns true if the specified file is excluded from the indexed provider, false otherwise.

<bool>IsInitialized <index>ProviderIndex

Returns true if the indexed provider is initialized, false otherwise.

<bool>IsProjectOpen <index>ProviderIndex

Returns true if a project is open for the indexed provider, false otherwise.

<void>LaunchOptions <index>ProviderIndex

Opens the Options dialog of the indexed provider. Corresponds to the Server>Options... option in the Asset Tracking dialog's menu.

<void>LaunchProvider <index>ProviderIndex

Launches the indexed provider. Corresponds to the Server>Launch Provider... option in the Asset Tracking dialog's menu.

<void>OpenFromVault()

Opens from Autodesk Vault.

<void>OpenProject <index>ProviderIndex <filename>ProjectPath

new.gif Opens the specified project using the indexed provider.

The call to atsops.openproject() is required in order to stay compliant with MSSCC and 3rd party providers like Perforce, Alienbrain, VSS etc. For consistency, Autodesk Vault also requires a call to atsops.openproject() if no scene file is open in 3ds Max.

For example:

atsops.login 2 --using the second provider...

atsops.openproject 2 "C:\\myVault\\3dsmax\\DWFTest" --open the project

fl = #("C:\\myVault\\3dsmax\\DWFTest\\noload.max") --define a file list

atsops.addfiles 2 fl "comment" --add the file list

atsops.logout 2 --log out from the second provider

 

<void>CloseProject <index>ProviderIndex

new.gif Closes the current project in the indexed provider.

<void>GetFromProvider <index>ProviderIndex <string>FilterName <string>FilterExtensions <bool>AddAllFilesFilter <bool>MultiSelect <bool>Download <&string array>FileList

FileList is In and Out parameter

Gets files from the indexed provider using the specified filterName and filterExtensions strings. If the AddAllFilesFilter parameter is supplied as true, adds all files. If MultiSelect is supplied as true, allows multiple selections. The FileList array passed by-reference will contain the resulting list of files returned by the provider.

<bool>TestFileStatus <index>ProviderIndex <string>Filename <enum>Status

Status enums: {#Unknown|#NotControlled|#Controlled|#CheckedOut|#CheckedOutOther|#OutOfDate|#Deleted|#Missing|#Modified|#CanCheckin|#CanCheckout|#CanUndoCheckout|#CanGetLatest|#CanAddFile|#CanShowHistory|#CanShowProperties}

Returns true if the specified file has the supplied status on the indexed provider.

<void>GetFilesByStatus <index>ProviderIndex <enum>Status <&string array>FileList

Status enums: {#Unknown|#NotControlled|#Controlled|#CheckedOut|#CheckedOutOther|#OutOfDate|#Deleted|#Missing|#Modified|#CanCheckin|#CanCheckout|#CanUndoCheckout|#CanGetLatest|#CanAddFile|#CanShowHistory|#CanShowProperties}

FileList is In and Out parameter

Returns all files that have the supplied status on the indexed provider into the by-reference FileList array.

<bool>Checkin <index>ProviderIndex <&string array>FileList <&TSTR>Comment

FileList is In and Out parameter

Comment is In and Out parameter

Checks in the files specified by the by-reference FileList array of strings using the by-reference Comment string into the indexed provider.

new.gif NEW in 3ds Max 9: Returns true if the action can be performed, false otherwise.

Note

The return value does NOT indicate whether the operation succeeded or failed- if you need that level of verification, you should call ATSOps.GetFileStatus() or ATSOps.Refresh() for a server update.

<bool>Checkout <index>ProviderIndex <&string array>FileList <&TSTR>Comment

FileList is In and Out parameter

Comment is In and Out parameter

Checks out the files specified by the by-reference FileList array of strings using the by-reference Comment string into the indexed provider.

new.gif NEW in 3ds Max 9: Returns true if the action can be performed, false otherwise.

Note

The return value does NOT indicate whether the operation succeeded or failed- if you need that level of verification, you should call ATSOps.GetFileStatus() or ATSOps.Refresh() for a server update.

<bool>UndoCheckout <index>ProviderIndex <&string array>FileList

FileList is In and Out parameter

Undoes the check out of the files specified by the by-reference FileList array of strings on the indexed provider.

new.gif NEW in 3ds Max 9: Returns true if the action can be performed, false otherwise.

Note

The return value does NOT indicate whether the operation succeeded or failed- if you need that level of verification, you should call ATSOps.GetFileStatus() or ATSOps.Refresh() for a server update.

<bool>GetLatest <index>ProviderIndex <&string array>FileList

FileList is In and Out parameter

Gets the latest version of the files specified by the by-reference FileList array of strings from the indexed provider. Corresponds to the File>Get Latest option in the Asset Tracking dialog's menu.

new.gif NEW in 3ds Max 9: Returns true if the action can be performed, false otherwise.

Note

The return value does NOT indicate whether the operation succeeded or failed- if you need that level of verification, you should call ATSOps.GetFileStatus() or ATSOps.Refresh() for a server update.

 

<bool>AddFiles <index>ProviderIndex <&filename array>FileList <&TSTR>Comment IsHidden:<&bool array>

FileList is In parameter

Comment is In and Out parameter

IsHidden default value: #()

IsHidden is In parameter

Adds the files specified by the by-reference FileList array of strings to the indexed provider, using the by-reference Comment string.

new.gif NEW in 3ds Max 9: Returns true if the action can be performed, false otherwise.

Note

The return value does NOT indicate whether the operation succeeded or failed- if you need that level of verification, you should call ATSOps.GetFileStatus() or ATSOps.Refresh() for a server update.

<void>Properties <index>ProviderIndex <&string array>FileList

FileList is In and Out parameter

Opens the Properties... dialog for the files specified by the by-reference FileList array of strings with the indexed provider. Corresponds to the File>Properties... option in the Asset Tracking dialog's menu.

<void>ShowHistory <index>ProviderIndex <&string array>FileList

FileList is In and Out parameter

Opens the History... dialog for the files specified by the by-reference FileList array of strings with the indexed provider. Corresponds to the File>History... option in the Asset Tracking dialog's menu.

The following 8 methods are implemented as menu utility functions which return true when a file is selected in the ATS dialog and the corresponding operation can be performed. When automating ATS functionality using MAXScript, these methods will generally return false! You can use the atsops.TestFileStatus() method to perform these tests as described in the notes below.

<bool>CanCheckin()

Returns true if checking in is possible in the ATS dialog, false otherwise.

Note

To test whether the atsops.Checkin() method can be called successfully, you should use

atsops.TestFileStatus providerIndex filename #CanCheckin

 

<bool>CanCheckout()

Returns true if checking out is possible in the ATS dialog, false otherwise.

Note

To test whether the atsops.Checkout() method can be called successfully, you should use

atsops.TestFileStatus providerIndex filename #CanCheckout

 

<bool>CanUndoCheckout()

Returns true if checking out can be undone in the ATS dialog, false otherwise.

Note

To test whether the atsops.undoCheckout() method can be called successfully, you should use

atsops.TestFileStatus providerIndex filename #CanUndoCheckout

 

<bool>CanGetLatest()

Returns true if getting latest is possible in the ATS dialog, false otherwise.

Note

To test whether the atsops.getLatest() method can be called successfully, you should use

atsops.TestFileStatus providerIndex filename #CanGetLatest

 

<bool>CanAddFiles()

Returns true if adding files is possible in the ATS dialog, false otherwise.

Note

To test whether the method atsops.addFiles() can be called successfully, you should use

atsops.TestFileStatus providerIndex filename #CanAddFile

 

<bool>CanProperties()

Returns true if getting the properties is possible in the ATS dialog, false otherwise.

Note

To test whether the method atsops.Properties() can be called successfully, you should use

atsops.TestFileStatus providerIndex filename #CanProperties

 

<bool>CanShowHistory()

Returns true if showing history is possible in the ATS dialog, false otherwise.

Note

To test whether the method atsops.showHistory() can be called successfully, you should use

atsops.TestFileStatus providerIndex filename #CanShowHistory

 

<bool>CanGetFromProvider <index>ProviderIndex

Returns true if getting from provider is possible in the ATS dialog, false otherwise.

 

 

<void>CheckForDependentFiles <index>ProviderIndex <string>Filename

Checks for files dependent on the supplied file in the indexed provider.

<void>CheckForCheckedOutFiles <index>ProviderIndex

Checks for checked out files in the indexed provider.

<void>CheckForUnControlledFiles <index>ProviderIndex

Checks for uncontrolled files in the indexed provider.

<void>CheckForOutDatedFiles <index>ProviderIndex

Checks for outdated files in the indexed provider.

<void>CheckForSceneFileCheckOut <index>ProviderIndex

Checks for scene file check-out in the indexed provider.

<void>SetWorkingComment <string>Comment

Sets the working comment to the supplied string.

<string>GetWorkingComment()

Returns the working comment as string.

<void>AppendStatusLog <string>Status

Adds the supplied string to the Status Log.

<void>ClearStatusLog()

Clears the Status Log.

<string>GetStatusLog()

Returns the Status Log as string.

<bool>RegisterNotification <value>Callback <integer>ID

Registers a notification callback with the specified integer ID.

<void>UnRegisterNotification <integer>ID

Unregisters the notification callback with the specified integer ID.

<enum>GetNotificationID()

GetNotificationID enums: {#NotifyPreLogin|#NotifyPostLogin|#NotifyPreLogout|#NotifyPostLogout|#NotifyPreOpenProject|#NotifyPostOpenProject|#NotifyPreCloseProject|#NotifyPostCloseProject|#NotifyPreLaunchOptions|#NotifyPostLaunchOptions|#NotifyPreLaunchProvider|#NotifyPostLaunchProvider|#NotifyPreCheckin|#NotifyPostCheckin|#NotifyPreCheckout|#NotifyPostCheckout|#NotifyPreUndoCheckout|#NotifyPostUndoCheckout|#NotifyPreAddFiles|#NotifyPostAddFiles|#NotifyPreGetLatest|#NotifyPostGetLatest|#NotifyPreProperties|#NotifyPostProperties|#NotifyPreShowHistory|#NotifyPostShowHistory|#NotifyFileListUpdate|#NotifyPreExploreProvider|#NotifyPostExploreProvider

Returns the notification ID.

<integer>GetNotificationFileList <&string array>FileList

FileList is In and Out parameter

Writes the notification file list into the by-reference array of strings.

<bool>AddAttachmentToNotificationFileListEntry <index>FileListIndex <string>Filename

Adds the file specified by the supplied Filename string as an attachment to the indexed file in the notification file list.

<bool>IsNotificationCancelled()

Returns true if notification was cancelled, false otherwise.

<bool>AddFileToNotificationFileList <string>Filename

Adds the supplied file name string to the notification file list. Returns true on success, false otherwise.

<bool>RemoveFileFromNotificationFileList <index>FileListIndex

Removes the indexed file name from the notification file list. Returns true on success, false otherwise.

 

<bool>SetPathOnSelection <filename>NewPath CreateOutputFolder:<bool>

CreateOutputFolder default value: false

Assigns the new path to the selection. If the optional CreateOutputFolder keyword parameter is supplied and is true, the new path will be created if it does not exist.

<bool>RetargetCommonRootOfSelection <filename>NewPath CreateOutputFolder:<bool>

CreateOutputFolder default value: false

Retargets the root of the selection to the new path. If the optional CreateOutputFolder keyword parameter is supplied and is true, the new path will be created if it does not exist.

<bool>RetargetSelection <filename>NewPath CreateOutputFolder:<bool>

CreateOutputFolder default value: false

Retargets the selection to the new path. If the optional CreateOutputFolder keyword parameter is supplied and is true, the new path will be created if it does not exist.

<bool>SetPath <filename>NewPath CreateOutputFolder:<bool>

CreateOutputFolder default value: false

Sets the new path. If the optional CreateOutputFolder keyword parameter is supplied and is true, the new path will be created if it does not exist.

<bool>RetargetCommonRoot <filename>NewPath CreateOutputFolder:<bool>

CreateOutputFolder default value: false

Retargets the common root. If the optional CreateOutputFolder keyword parameter is supplied and is true, the new path will be created if it does not exist.

<bool>RetargetAssets <&maxObject>AssetOwner <filename>OldPath <filename>NewPath CreateOutputFolder:<bool>

AssetOwner is In and Out parameter

CreateOutputFolder default value: false

Retargets the assets of the specified asset owner from the given old path to the new path. If the optional CreateOutputFolder keyword parameter is supplied and is true, the new path will be created if it does not exist.

 

<names array>GetFileStatus <index>ProviderIndex <string>Filename

new.gif NEW in 3ds Max 9: Returns an array of Name Literals based on the status of the file.

For example:

myStatus = ATSOps.GetFileStatus 1 "C:\\myVault\\myScene.max"

#(#Controlled, #OutOfDate, #Modified)

 

<names array>GetFileSystemStatus <index>ProviderIndex <string>Filename

new.gif NEW in 3ds Max 9: Returns an array of Name Literals based on the status of the file.

<bool>ResolveSelectionToUNC()

new.gif NEW in 3ds Max 9: Converts paths selected in the Asset Tracker to UNC paths.

<bool>ResolveSelectionRelativeToProjectFolder()

new.gif NEW in 3ds Max 9: Converts paths selected in the Asset Tracker to relative paths with respect to the project folder.

<bool>ResolveSelectionToAbsolute()

new.gif NEW in 3ds Max 9: Converts relative paths selected in the Asset Tracker to absolute paths.

<bool>IsInputFile <filename>Filename

new.gif NEW in 3ds Max 9: Returns true if the specified file name is an input file, false otherwise.

<void>SetWorkingFolder <index>ProviderIndex <filename>Folder

new.gif NEW in 3ds Max 9: Sets the working folder of the indexed provider to the specified file name.

<filename>GetWorkingFolder <index>ProviderIndex

new.gif NEW in 3ds Max 9: Returns the working folder file name of the indexed provider.

<bool>IsFileShareLocked <index>ProviderIndex <filename>Filename

new.gif NEW in 3ds Max 9: Returns true if the specified file share is locked, false otherwise.

<integer>GetFilesByFileSystemStatus <enum>Status <&filename array>FileList

Status enums: {#Unknown|#Ok|#Missing|#Found|#NetworkPath}

FileList is In and Out parameter

new.gif Returns the number of files with the specified system status and and array of the file names via the by-reference parameter FileList.

<bool>TestFileSystemStatus <filename>Filename <enum>Status

Status enums: {#Unknown|#Ok|#Missing|#Found|#NetworkPath}

new.gif NEW in 3ds Max 9: Returns true if the given file name has the specified status, false otherwise.

<integer>GetResolvedPaths <&filename array>FileList <&filename array>ResolvedFileList

FileList is In parameter

ResolvedFileList is In and Out parameter

new.gif NEW in 3ds Max 9: Returns the number of resolved paths. The list of the files to check should be passed via the FileList parameter. The by-reference ResolvedFileList parameter will be filled with the resolved file names.

<integer>GetMinVersion <index>ProviderIndex <filename>Filename

new.gif Returns the min. version of the given filename using the indexed provider.

<integer>GetMaxVersion <index>ProviderIndex <filename>Filename

new.gif Returns the max. version of the given filename using the indexed provider.

<bool>GetVersion <index>ProviderIndex <filename>Filename <integer>VersionNumber

new.gif Gets the specified version of the given file using the indexed provider. Returns true on success, false otherwise.

<index>GetNotificationProviderIndex()

new.gif Returns the current provider index.