Skip to main content
Known Participant
February 15, 2008
Question

How to add transparency if Uid Ref of a Graphic frame is avaliable.

  • February 15, 2008
  • 2 replies
  • 350 views
I want to change the transparency of any graphic item to 50%.
How can I acheive this if I am provided with UIDRef of the Graphic Frame.

Through Indesign UI we can right click on any of the graphic frame and then selecte "Transperancy" under Effects and can change the transperancy to the desired value, But how this can be done through the Code.
This topic has been closed for replies.

2 replies

Known Participant
February 19, 2008
Hi Satoru,

Thanks a Lot for your kind help, Its working very Fine.

--Rizwan
Known Participant
February 15, 2008
Hello rizwan.
Try this.

InterfacePtr<ICommand> setBasicAttrCmd(CmdUtils::CreateCommand(kXPSetBasicAttributesCmdBoss));
setBasicAttrCmd->SetItemList( UIDList(itemRef) );
InterfacePtr<IXPSetBasicAttributesCmdData> basicAttrData(setBasicAttrCmd,UseDefaultIID());
basicAttrData->fSetOpacity=1;
basicAttrData->fData.fOpacity = value; /* 0 to 100 */
CmdUtils::ProcessCommand(setBasicAttrCmd);

Hope this helps you.
-Satoru