Solved

How can I enable the new viewtype bar in the resource scheduler?

  • 14 December 2020
  • 3 replies
  • 61 views

Userlevel 4
Badge +14

For a new project, I want to be able to use different viewtypes in the resource scheduler (see 

https://community.thinkwisesoftware.com/topic/show?tid=1456&fid=21).

I downloaded GUI version 2021.1.10.    

How can I enable the viewtype bar? 

 

icon

Best answer by Mark Jongeling 14 December 2020, 13:46

View original

This topic has been closed for comments

3 replies

Userlevel 7
Badge +23

Hi Andre, 

The viewtype bar will be available when you have set up multiple viewtypes in the Extender properties. Click on View types and use the + task to add a new ‘Scheduler view type’. 

When you have the new property available, edit the property and select the viewtype you would like to have available. 'Timeline’ is the 'old’ view type we are accustomed to.

And it results in this:
 

Hope this helps!

Kind regards,
Mark Jongeling

Userlevel 4
Badge +14

Hi Mark, 

Thanks for your quick response! 

We are not using the extender definition in the model yet. We are about to upgrade, but for now we are still on SF2018.2. 

What properties do I need to add?  

Thanks!

André

 

Userlevel 7
Badge +23

Hi Andre,

The following is needed to make it work:

ResourceScheduler schedulerModel = new ResourceScheduler(resourceObj.ID, resourceObj, taskObj, null);


schedulerModel.ViewTypes.Clear();
schedulerModel.ViewTypes.Add(TSFSchedulerViewType.Day);
schedulerModel.ViewTypes.Add(TSFSchedulerViewType.Month);

If you already have a ResourceScheduler, then the top row is already present in your ObjectModelExtender. 

To add (a) new view type(s), add one or multiple of the following lines:

schedulerModel.ViewTypes.Add(TSFSchedulerViewType.Day);

schedulerModel.ViewTypes.Add(TSFSchedulerViewType.Month);

schedulerModel.ViewTypes.Add(TSFSchedulerViewType.Timeline);

schedulerModel.ViewTypes.Add(TSFSchedulerViewType.Week);

schedulerModel.ViewTypes.Add(TSFSchedulerViewType.Workweek);


The code editor will also show you which options are available when you type schedulerModel

More info about the ObjectModelExtender here: https://docs.thinkwisesoftware.com/docs/kb/objectmodel_extender_template.html 
Note, this is only if you are not using the Extenders inside the Software Factory.

Kind regards,
Mark Jongeling