Saving custom objects in station file
DanLars
✭
Hi,
Is there any way to save custom class objects as part of the station file?
Regards, Lars Glud
Is there any way to save custom class objects as part of the station file?
Regards, Lars Glud
Lars Glud
Danrob A/S
Danrob A/S
0
Comments
-
Hi Lars,
Don't really know exactly what you are refering to here? Most class objects associated with RobotStudio like SmartComponents or Addins etc have their own file and save system.
Genericly you can reference a file as a station document, and then set a flag to include it in Pack&Go like this:
But it would only be saved with the station as part of the Pack&go.
Code in VSTA placed in the station will be part of the station save.
John
Developer Center0 -
Hi Lars,every ProjectObject has a key/value set called Attributes. In an attribute you can store for example an XML file as a string.The purpose of the attributes is more to extend an existing class, than persisting your own class.As John mentioned you can add a "document" to the station, and in that document you can also store piece of XML.Here are some links to the corresponding APIs:0
-
Hi, Following the thread.... In the addin I'm developing, i 've used the ProjectDocument class to add some configurations files (XML format) to station trough the ProjectDocumentCollection. I haven't had any problems creating this files and changing their flags to "ProjectDocumentFlags.IncludedInPackAndGo" when is a embedded file. But when i try to add to station some reference folder using "public ProjectDocument(FolderName, ProjectDocumentType.FolderReference, ProjectDocumentFlags.IncludeInPackAndGo)" , I change the flag "ProjectDocumentFlags" to " Pack recursive to include subfolders, it seems that the station lost the "IncludeInPackAndGo" "property" and finally, when the user packages the station, RS doesn`t include the information included in the subfolders.... In resume, i try to replicate by code what the user can do when wants to include some files/folder but i've not achieved the same result... and there isn't any example explaining the secuence of this task... I have to say that this problems happens inside the function associated to the event of "Station.Saving". I don't know if is related.... I attached a image showing the secuence i want to develop by code. can anybody help me? thanks in advanced.0
Categories
- All Categories
- 5.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings