0
Error when trying to rasterise smart object using JavaScript
Participant
,
/t5/photoshop-ecosystem-discussions/error-when-trying-to-rasterise-smart-object-using-javascript/td-p/11398029
Aug 30, 2020
Aug 30, 2020
Copy link to clipboard
Copied
I get "Error 8800: General Photoshop error occurred. This functionality may not be available in this version of Photoshop."
- The command "<unknown>" is not currently available.
Line: 56
-> executeAction( idinvokeCommand, desc7, DialogModes.ON );
The following is the script in question, and I used script listener to capture it.
function rasteriseObject(){
var idinvokeCommand = stringIDToTypeID( "invokeCommand" );
var desc7 = new ActionDescriptor();
var idcommandID = stringIDToTypeID( "commandID" );
desc7.putInteger( idcommandID, 3549 );
var idkcanDispatchWhileModal = stringIDToTypeID( "kcanDispatchWhileModal" );
desc7.putBoolean( idkcanDispatchWhileModal, true );
executeAction( idinvokeCommand, desc7, DialogModes.NO );
}
TOPICS
Actions and scripting
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Explore related tutorials & articles
Advocate
,
/t5/photoshop-ecosystem-discussions/error-when-trying-to-rasterise-smart-object-using-javascript/m-p/11398104#M359675
Aug 30, 2020
Aug 30, 2020
Copy link to clipboard
Copied
Try something like...
rasterizeLayer();
function rasterizeLayer() {
var descriptor = new ActionDescriptor();
var reference = new ActionReference();
reference.putEnumerated( charIDToTypeID( "Lyr " ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ));
descriptor.putReference( charIDToTypeID( "null" ), reference );
executeAction( stringIDToTypeID( "rasterizeLayer" ), descriptor, DialogModes.NO );
}
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
daniell11223644
AUTHOR
Participant
,
LATEST
/t5/photoshop-ecosystem-discussions/error-when-trying-to-rasterise-smart-object-using-javascript/m-p/11398210#M359690
Aug 30, 2020
Aug 30, 2020
Copy link to clipboard
Copied
Hi, the following appears to work
function rasteriseObject(){
var idrasterizeAll = stringIDToTypeID( "rasterizeAll" );
executeAction( idrasterizeAll, undefined, DialogModes.NO );
}
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

