Scheduling using any year?

Write here what nice effects or shows you have done with MADRIX or ask other users.

Moderator: MADRIX Team

User avatar
Wissmann
Developer
Developer
Posts: 774
Joined: Fri Feb 23, 2007 3:36 pm
Location: Germany
Contact:

Re: Scheduling using any year?

Post by Wissmann »

Hi Maria,
can you send me your setup or at least your cuelist to info@madrix.com please
and leave a message here if done.
THX
LEDs are nothing without control ;-)
mariajenkins
Posts: 7
Joined: Sat Aug 06, 2016 7:04 pm

Re: Scheduling using any year?

Post by mariajenkins »

Hi!

I just sent the files to you!

Thank you for your help,

Maria
User avatar
Wissmann
Developer
Developer
Posts: 774
Joined: Fri Feb 23, 2007 3:36 pm
Location: Germany
Contact:

Re: Scheduling using any year?

Post by Wissmann »

Because of this thread we figure out a bug in MADRIX when trying to set the CueDate by macro. We fixed this issue in the today released MADRIX Version 3.6b.
Please download this version and update MADRIX to it.
.
Also i modified the macro so it will detect the change of the year automaticaly and rechange all Cues.
.
Below the modified macro:
.

Code: Select all

@scriptname="ChangeAllYueYearByCurrentYear";
@author="S.Wissmann - inoage GmbH";
@version="4";
@description="";

int lastFrameYear;

void ChangeCues(int Year)
{
	int cueCount = CuelistCount();
	int cueDay, cueMonth, cueYear;	
	int cueChanged = 0;
	
	for(int cueNumber = 0; cueNumber < cueCount; cueNumber++)
	{
		if(CueGetDateWeekday(cueNumber) != 8)
		{			
			cueYear = CueGetDateYear(cueNumber);
			if(cueYear != Year)
			{
				cueDay = CueGetDateDay(cueNumber);
				cueMonth = CueGetDateMonth(cueNumber);
				CueSetDate(cueNumber, Year, cueMonth, cueDay);				
				cueChanged++;
			}
		}
	}
}

void InitEffect()
{
	date d = GetDate();
	lastFrameYear = d.year; 
	ChangeCues(lastFrameYear);
}

void PreRenderEffect()
{
	date d = GetDate();
	int thisFrameYear = d.year;

	if(thisFrameYear != lastFrameYear)
		ChangeCues(thisFrameYear);
		
	lastFrameYear = thisFrameYear;
}

void PostRenderEffect()
{

}

void MatrixSizeChanged()
{
	InitEffect();
}
LEDs are nothing without control ;-)
Locked