Solved

Can I use element parameter in "Start" in a WebUI Gantt Chart?


Userlevel 4
In the WebUI Gantt chart, under Settings > Add Gantt Layer, there is space for the Start and the Duration. However, both of these only accept parameters. I have a project with a full WinUI that needs to be converted, and it uses an element parameter as the Start.

How can I use the element parameter as the start? Is there a way to do this directly? Or do I need to do a fancy workaround?

Thanks!
icon

Best answer by Chris Kuip 23 April 2019, 21:35

To convert a WinUI Gantt Chart based on a calendar, I use the following code:

code:
p_WebUI_JobStartTime(indices) :=
TimeslotToMoment(
Calendar : Cal_HourCalendar,
ReferenceDate : ep_startHour,
Timeslot : ep_WinUI_JobStart(indices)) +
P_timeZoneOffsetNeededForWebUIGanttCharts ;



Here p_timeZoneOffsetNeededForWebUIGanttCharts is defined as:
code:
TimeZoneOffSet( 'UTC', 'LocalDST', UseDST: 1 )



hope this helps.
View original

2 replies

Userlevel 4
Hi @MathFour , You can't indeed use an element parameter in the WebUI GanttChart. You will need to use a workaround, knowing that "The start identifier should represent the number of hours relative to Gantt Chart reference time" as specified in the doc.

But I'm curious, what is the value of your element parameter ? Does it represent an integer or a number ?

If you could attach a model to this question, that would be even better !
Userlevel 3
To convert a WinUI Gantt Chart based on a calendar, I use the following code:

code:
p_WebUI_JobStartTime(indices) :=
TimeslotToMoment(
Calendar : Cal_HourCalendar,
ReferenceDate : ep_startHour,
Timeslot : ep_WinUI_JobStart(indices)) +
P_timeZoneOffsetNeededForWebUIGanttCharts ;



Here p_timeZoneOffsetNeededForWebUIGanttCharts is defined as:
code:
TimeZoneOffSet( 'UTC', 'LocalDST', UseDST: 1 )



hope this helps.

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator