Skip to main content
Solved

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

  • April 4, 2019
  • 2 replies
  • 117 views

MathFour
AIMMS Partner
Forum|alt.badge.img
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!

Best answer by Chris Kuip

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.

2 replies

Arthur
Forum|alt.badge.img+1
  • Former AIMMSian
  • 26 replies
  • April 8, 2019
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 !

Chris Kuip
AIMMSian
Forum|alt.badge.img+7
  • AIMMSian
  • 125 replies
  • Answer
  • April 23, 2019
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.


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

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