Correct Way to Import and Export Classes?

More
1 month 1 day ago #47 by User
Hello Everyone,

I was wondering what the best, correct, or intended way is to transfer class volumes and subgraphs between different projects. Since there are multiple methods I’m aware of, I wanted to ask for guidance.

Method 1
  • Export the content using an export node to create a .dbs file.
  • Create a new class and import the content using the .dbs file, then copy the subgraphs separately.
Method 2
  • Copy the necessary entries, including src -> "pop" and db, as well as the common load folder under bld.
  • Add the volume as described in the CVolGa installation guide.
I believe this is the only method that imports both classes and subgraphs simultaneously.

Method 3
  • Create a wb_load file by dumping the project.
  • Configure the volume as a new class volume and replace the load file.
  • Copy the subgraphs separately.
Which method would be the best, or is there another approach that would be more suitable for this task? Also, how would one correctly implement the given method?

Thanks in advance!
User

Please Log in or Create an account to join the conversation.

More
3 weeks 5 days ago #59 by claes
Hi,

External volumes can be loaded into the development environment by creating a WbEnviroment object in the directory volume. Search paths for dbs-files are specified in the WbEnvironment object and volumes to load are specified with RootVolmeLoad or ClassVolumeLoad objects under the WbEnvironment object.

Importing and exporting files can be made with the Build configuration in the directory volume. See the documentation for BuildConfig.

For subgraphs you need to import pwsg files to $pwrp_pop.
For class volumes containing function objects, pwr_’volumename’classes.h has to be imported to $pwrp_inc. For simulation in the development environment also the dbs-file has to be imported to $pwrp_load. I think there is also an issue with the plc editor palette, where the plc editor entry for the class volume in $pwrp_db/pwrp_cnf_palette.dat has to merged.

/Claes

Please Log in or Create an account to join the conversation.

Time to create page: 0.417 seconds
Powered by Kunena Forum