Welcome, Guest
Username: Password: Remember me

TOPIC: WbEnvironment information

WbEnvironment information 12 years 9 months ago #2508

  • Snarf77
  • Snarf77's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 847
  • Thank you received: 2
  • Karma: 5
Hi all,

I have to share a class volume between two projects. I followed explanations given here
http://www.proview.se/index.php?option=com_joomlaboard&Itemid=24&func=view&id=880&catid=3&limit=6&limitstart=6
and now I can access my module on my new project (thanks to a WbEnvinronment object and a classvolume load object), but I can't edit the class volume I declare. I don't have the open Editor right clic option as I had in the classconfigvolume object on the other computer.

First, is that normal or did I forget something to authorise editing ?

If this is normal, what is the correct procedure to edit (and modify my .dbs class volume) in another computer ??

Thanks in advance

Snarf
The administrator has disabled public write access.

Re:WbEnvironment information 12 years 9 months ago #2510

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Hi Sharf,

Yes, this is normal. The idea is that one project owns the classvolume, and is able to export it to other projects, but it's only the owner project that has the source code and can edit the volume. Edit a volume in two projects is not something that is supported, though it is possible to achieve.

If you have to edit the class volume in another project you have to configure it as an 'owned' volume with a ClassVolumeConfig object. You also have to change the project of the volume in the global volume list. You then copy the file $pwrp_db/'volumename'.wb_load between the projects. It's not easy to merge this file so you should not edit it in both project simultaneously. In this case you generate the dbs file wheh youj build the volume, and you don't need the wbenvironment object.

/Claes
The administrator has disabled public write access.

Re:WbEnvironment information 12 years 9 months ago #2511

  • Snarf77
  • Snarf77's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 847
  • Thank you received: 2
  • Karma: 5
Hi Claes,

thanks a lot for answer.

The fact that it is not possible to edit in two projects is no problem (this will avoid mutliple \"original' version of the volume) which is better for \"quality\" process.

I only need to change the \"owner\" (computer) of the class volume for the moment so your procedure is OK for me.

Thanks

Snarf
The administrator has disabled public write access.

Re:WbEnvironment information 12 years 7 months ago #2629

  • Snarf77
  • Snarf77's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 847
  • Thank you received: 2
  • Karma: 5
Hi Claes,

Third try ... different problem ....

Indeed, I want to configure my class volume in another project (just for use, not editing) so I declare a WbEnvironment object following the procedure described at the beginning of this post.

I declare the ClassVolumeLoad objet and set the directory source where the .dbs is.

When trying to open the root volume of my project I got the following error:
-- Opening volume 'VolPLC1'
/usr/pwr48/os_linux/hw_x86/exp/exe/wb_open_db.sh: line 61: 2435 Bus error wb -q \"$username\" \"$password\" $database

Any guess what could be the problem ??

One clue could be that I tried before the first option (configuring the class volume directly with a ClassVOlumeCOnfig object...) perhaps is there some traps remainnig somewhere ??

Snarf
The administrator has disabled public write access.

Re:WbEnvironment information 12 years 7 months ago #2632

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Bus error usually means that there is problem with reading a file. The dbs-files are mapped, and you have to have both read and write permissions to map a file. Check that the user who is starting the configurator has both read and write permissions on the dbs-file.

/Claes
The administrator has disabled public write access.

Re:WbEnvironment information 12 years 7 months ago #2634

  • Snarf77
  • Snarf77's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 847
  • Thank you received: 2
  • Karma: 5
Thank you Claes,

error disappeared... You're the best...

I can now see my module in the plant palette but I have another little error with the palette in plc editor.

I can see a menu entry with the name I declare in the pwrp_cnf_palette but I can't list the modules that belong to this class. Instead I just see a \"leaf\" with the name I enter in the cnf_palette file but no module.

palette PlcEditorPalette
{
menu MyLibraryName
{
class myname
}
}

What should exactly the \"myname\" match ? the dbs filename (without .dbs) or the name of the ClassHier object within the class volume ??

I tried botth but this only changes the object name of the \"leaf\" that appears in the editor...

What could I have forgotten ??

Thanks
The administrator has disabled public write access.
Time to create page: 9.230 seconds