Skip navigation
Currently Being Moderated

Is it possible to show/hide guides via the csawlib or any other way?

Apr 28, 2013 1:00 PM

Hello, in an upcoming update to GuideGuide I've moved nearly all my code into the panel and am relying heavily on the csawlib. Unfortunately, it seems that now when guides are added to the stage, if the user has not set guides to be visible, GuideGuide adds the guides but does not reveal them. This has resulted in a number of support tickets from people that assume GuideGuide is broken. I've been confused by it myself on many occasions.



Is it possible to show/hide guides using the csawlib? I've searched through the docs but can't find anything that indicates it's possible.



I've still got a .jsx file that gets embedded when the panel is compiled I use to get around the broken history suspension in the csawlib. I'd settle for a javascript solution if that's all there is. Looking through a list of values that charIDToTypeID accepts I've seen some guide related things, but so far the structure of that sort of code has been a bit incomprehensible.

  • Currently Being Moderated
    May 2, 2013 7:29 PM   in reply to cameronmcefee


    I cannot reproduced this issue using the follow steps:

    1. Disable Show > Guides.

    2. Try to show the added guides in Sets in GuideGuide extension.


    Guides can be shown successfully.


    I don't know if the steps I used same with yours. If not, please privde your exactly steps; if so, please help to privde the version numbers of Extension builder, csawlib and Photoshop, and I will try to reproduce it again.

    Thanks a lot.

    Mark as:
  • Currently Being Moderated
    May 6, 2013 2:29 AM   in reply to cameronmcefee

    Hi cameronmcefee,

    Thanks for your reply, and issue can be reproduced with your detailed steps.

    Mark as:
  • Currently Being Moderated
    May 6, 2013 10:47 AM   in reply to cameronmcefee

    The problem is that you are using the new system to add guides, if you used the old action manager guides will be shown when a new guide is added....



    //This will not show if guides are hidden.
    activeDocument.guides.add(Direction.HORIZONTAL,new UnitValue(250,'px'));
    //these will.. 
    function guideLine(position, type){
        var desc27 = new ActionDescriptor();
            var desc28 = new ActionDescriptor();
            desc28.putUnitDouble( app.charIDToTypeID('Pstn'), app.charIDToTypeID('#Pxl'), position );
            desc28.putEnumerated( app.charIDToTypeID('Ornt'), app.charIDToTypeID('Ornt'), app.charIDToTypeID(type) );
        desc27.putObject( app.charIDToTypeID('Nw  '), app.charIDToTypeID('Gd  '), desc28 );
        executeAction( app.charIDToTypeID('Mk  '), desc27, DialogModes.NO );
    Mark as:
  • Currently Being Moderated
    May 6, 2013 11:50 AM   in reply to cameronmcefee

    I think this could be classed as a bug as if a new guide is created in Photoshop the other guides will show if they were hidden.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points