Initializing help system before first use

insightgetattachbytag

Purpose
Searches the scenario and the containing app for an attachment or attachments with the given tag, and retrieves them from the Insight server, placing them in a directory where they can be read by the model. If any scenario attachments with the given tag are found, these are retrieved without searching the app. If no scenario attachments with the given tag are found, then the search continues at the app level.
Synopsis
procedure insightgetattachbytag(tag:text, directory:text, attachments:list of insightattachment)
procedure insightgetattachbytag(tag:text, attachments:list of insightattachment)
procedure insightgetattachbytag(tag:text, directory:text, attachment:insightattachment)
procedure insightgetattachbytag(tag:text, attachment:insightattachment)
procedure insightgetattachbytag(tag:text, directory:text, attachnames:list of text)
procedure insightgetattachbytag(tag:text, attachnames:list of text)
Arguments
tag 
The tag to search for
directory 
The path of a local directory to which to write the attachment files. The directory must already exist. If not specified or empty string, the attachments will be written to the Mosel working directory.
attachment 
An attachment object which will be populated with the details of the attachment that was retrieved
attachments 
A list which will be populated with the details of the attachments that were retrieved
attachnames 
A list which will be populated with the names of the attachments that were retrieved
Example
declarations
  attachment: insightattachment
end-declarations
insightgetattachbytag('mytag1', attachment)
if insightattachstatus<>INSIGHT_ATTACH_OK then
  writeln("Error searching for attachments")
else
  writeln('Initialize data structures from ',attachment.filename)
  ! Add data initialization code here
end-if
Example of searching for and retrieving an attachment with the tag tag1
Further information
1. Check the attachment status code using insightattachstatus to determine whether the attachment(s) were successfully retrieved.
2. Attempting to access attachments when the model is not being run through Xpress Insight will cause the model to abort with an error, except when test mode has been activated by setting insight_testmode.
Related topics

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.