Book a Demo

Author Topic: Shape Script and Alternate Images  (Read 5922 times)

i4mdone

  • EA User
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Shape Script and Alternate Images
« on: April 24, 2018, 08:40:00 am »
Is there an ability through Shape Script to only update the Alternate Image? 

I would like to be able to define and select an option from a tagged value, which in turn the Shape Script knows to render the correlating image, but only as an Alternate Image (or at least that it behaves like selecting Alternate Image).

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 320
  • Karma: +15/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: Shape Script and Alternate Images
« Reply #1 on: April 24, 2018, 09:23:22 am »
You can do that by using 'image' method

Code: [Select]
if (hastag("TAGNAME","VALUE"))
{
      image("IMGID",0,0,100,100);
      addsubshape("name","S");

      shape name
      {
            h_align="center";
            print("#NAME#");
      }
}


i4mdone

  • EA User
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: Shape Script and Alternate Images
« Reply #2 on: April 24, 2018, 09:35:52 am »
Yes thank you - however that method behaves similar to the "Default Image" function as opposed to "Alternate Image" function.  I am looking for a way through Shape Script to mimic "Alternate Image" behavior.

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 320
  • Karma: +15/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: Shape Script and Alternate Images
« Reply #3 on: April 24, 2018, 10:16:00 am »
Ah! that's right, I have mostly done this toggle based on 'Use Rectangle Notation' which is a diagram specific setting, hence didn't realize it was actually setting the default image.

Not sure if there is another way to do this through shape script.