Skip to main content

Search

Search

Vb Script - Ghs Symbol Logic Error

Comments

8 comments

  • Avatar
    Ian Cummings
    Moderator

    Generally there should be no need to modify the VB script that controls the GHS symbols whatsoever.  However, with that said there is a small error in the document level VB script concerning a variable name for the GHS symbol spacing method.  Either rename the "GHS_SpacingMethod" data source to be ""GHS_Spacing", or adjust the below variable reference on line 80 of the script.

     

    Const const_nds_spacing      = "GHS_Spacing"

     

    to

     

    Const const_nds_spacing      = "GHS_SpacingMethod"

     

    From what I can see the field you mention is in fact named "ghstom.pictograms" - note the "s" on the end.  In any case, I'd advise you to set an alias on the table and field names as the script relies on them to be named as expected.  if the field names are different then you have to mangle the VB script.  Far easier to set an alias where needed in your database connection.

     

    Be sure to read the white paper as it explains the steps that are needed.  We are also in the process of producing a video on this subject too, so look out for that in the coming weeks.

     

    http://www.seagullscientific.com/assets/images/industries/ghs-compliance-labeling.pdf

    0
  • Avatar
    Legacy Poster

    Ian - first thank you very much for looking at this. Its great that your team can take the time to look at all of these and respond so timely. 

    So - i took your advice and renamed my copy of the GHStom.csv to GHS.csv - this to simplify things a bit and keep it to be like your sample format. I reconnected the database to the csv and it appropriate brought up the data in the browse functions of the database and the csv. I also made the change to line 80 you suggested 'Const const_nds_spacing      = "GHS_SpacingMethod"' however i find it interesting that it worked with your sample template. And finally i saved, closed and reopened the template. Again checked all connections and then performed the 'TEST' button on the script - and i still get the exact error as noted previously. Any ideas? I have attached the updated btw file.

    0
  • Avatar
    Ian Cummings
    Moderator

    Difficult to say as I cannot test the label for I don't have access to your CIJIGSAW database.  Do you get the error when actually printing or previewing?  I ask as clicking on the "Test" button is not always helpful when making reference to database fields as you won't have an active connection to the database.  You'd probably need to put in default data for your field connected objects for this reason when doing such a test.

    0
  • Avatar
    Legacy Poster

    I do get the error on 'print preview'. Prompts for item number - then pops up the error. If I hit continue - it does bring up the label - but of course without the GHS symbols. And it comes up with the error again. I understand that you are limited without the jigsaw database table.

    Thanks

    0
  • Avatar
    Ian Cummings
    Moderator

    I suggest you set the record selection in the Print dialog to be select at print time so you can see what records and data in each field is available to the label at print time.  I'd suspect that data from the database/datafile that you think will be in there for the label to use, isn't, hence the script having a problem due to missing input.

    0
  • Avatar
    Legacy Poster

    I changed the location of the PICTOGRAM AREA and it now prints the graphics outside the area of the rectangle.

    0
  • Avatar
    Ian Cummings
    Moderator

    Make sure the pictogram area has an "Object Reference Point" of top left, which is found in the "Position" section of the object's properties.

    0
  • Avatar
    Legacy Poster

    Thanks Ian, After fiddling with it for awhile I was able to get it where I wanted. The colored rectangle is way North of where the pictograms are located, though. It looks as if the code and colored gif got disconnected somehow, but I was able to position the pictograms and then hide the layer so that I could see the other fields that the rectangle was blocking.

    0

Please sign in to leave a comment.