Class ProjectDocument
Represents a document associated with a project.
Inherited Members
Namespace: ABB.Robotics.RobotStudio
Assembly: ABB.Robotics.RobotStudio.dll
Syntax
sistent("ProjectDocument")]
public sealed class ProjectDocument : ProjectObject
Constructors
ProjectDocument(String, ProjectDocumentType)
Creates a new ProjectDocument
Declaration
public ProjectDocument(string url, ProjectDocumentType type)
Parameters
Type | Name | Description |
---|---|---|
String | url | Document URL |
ProjectDocumentType | type | Document type |
Remarks
To create an embedded file, use ProjectDocument(string name, byte[] data).
ProjectDocument(String, ProjectDocumentType, ProjectDocumentFlags)
Creates a new ProjectDocument
Declaration
public ProjectDocument(string url, ProjectDocumentType type, ProjectDocumentFlags flags)
Parameters
Type | Name | Description |
---|---|---|
String | url | Document URL |
ProjectDocumentType | type | Document type |
ProjectDocumentFlags | flags | Document flags |
Remarks
To create an embedded file, use ProjectDocument(string name, byte[] data).
ProjectDocument(String, Byte[])
Creates a new embedded ProjectDocument from binary data.
Declaration
public ProjectDocument(string name, byte[] data)
Parameters
Type | Name | Description |
---|---|---|
String | name | Document data |
Byte[] | data | Document name |
Properties
Available
Returns true if the document can be accessed.
Declaration
public bool Available { get; }
Property Value
Type | Description |
---|---|
Boolean |
Comment
Gets or sets a comment for the document.
Declaration
public string Comment { get; set; }
Property Value
Type | Description |
---|---|
String |
Flags
Gets or sets the document flags.
Declaration
public ProjectDocumentFlags Flags { get; set; }
Property Value
Type | Description |
---|---|
ProjectDocumentFlags |
LastChange
Gets the last time the document was modified.
Declaration
public DateTime? LastChange { get; }
Property Value
Type | Description |
---|---|
Nullable<DateTime> |
Remarks
Returns null if the document isn't accessible.
Size
Gets the size (in bytes) of this document.
Declaration
public long Size { get; }
Property Value
Type | Description |
---|---|
Int64 |
Remarks
Returns -1 for a folder reference, or if the document isn't accessible.
Type
Gets the type of document.
Declaration
public ProjectDocumentType Type { get; }
Property Value
Type | Description |
---|---|
ProjectDocumentType |
Url
Gets or sets the URL of the document. For a file or folder reference, this is a file system path.
Declaration
public string Url { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
AfterLoad(PimDocument)
Declaration
protected override void AfterLoad(PimDocument doc)
Parameters
Type | Name | Description |
---|---|---|
RobotStudio.API.Persistence.PimDocument | doc |
Overrides
BeforeSave(PimDocument)
Declaration
protected override void BeforeSave(PimDocument doc)
Parameters
Type | Name | Description |
---|---|---|
RobotStudio.API.Persistence.PimDocument | doc |
Overrides
GetData()
Gets the binary data of an embedded document.
Declaration
public byte[] GetData()
Returns
Type | Description |
---|---|
Byte[] |
SetData(Byte[])
Sets the binary data of an embedded document.
Declaration
public void SetData(byte[] data)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | data |