Jump to content

Need help in creating rule for choosing color images


MikeVM

Recommended Posts

This is a problem.

I have to create a template where customer select its name from drop-down menu and thus put his logo on the color background. All logos come from the library. Amount of logos - about 50 and each of it can be printed in at least three different colors by customer choice.

 

Is there other ways than creating simple if... then rules for 150 of them?

 

-- Let's say - analyzing actual logo name (in format

Name_color.eps) So when client picks his logo AND select certain color -- then correct logo placed in the frame.

 

-- another way I was thinking of - applying color attribute to logo (similar to color text) - I can make these logo bitmap b/w for these...

Not sure if this is possible.

 

any help would be appreciated

Link to comment
Share on other sites

Mike,

The method you mentioned is exactly how this can be done. Using a create resource rule:

 

return CreateResourceEx(Field("Logo")+Field("LogoColor") + '.eps', "graphic",1);

 

This will require that all 150 of your Logos be named very specifically to match the resource by name to that which is created by the rule.

 

Hope this helps!

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

is it possible to modify create resource rule

 

return CreateResourceEx(Field("Logo")+Field("LogoColor") + '.eps', "graphic",1);

[code]

so it would create images either .eps or .pdf - we have mixed files we choose from...

 

TIA

Link to comment
Share on other sites

is it possible to modify create resource rule

 
return CreateResourceEx(Field("Logo")+Field("LogoColor") + '.eps', "graphic",1);

so it would create images either .eps or .pdf - we have mixed files we choose from...

 

var base = Field("Logo") + Field("LogoColor");
var res = CreateResource(base + ".eps", "graphic", true);
if (res.exists)
 return res;

res = CreateResource(base + ".pdf", "graphic", true);
if (res.exists)
 return res;

ReportError("Resource not found for " + base);

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...