Sha256: 14ec47537cf28f77adce926252c7dac34183e7a0a5f6b1f62114e9cbe5c3906c

Contents?: true

Size: 843 Bytes

Versions: 1

Compression:

Stored size: 843 Bytes

Contents

module Asposetasksjava
  module ReadTimephasedResourceData
    def initialize()
        data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
                
        # Instantiate project object
        project = Rjb::import('com.aspose.tasks.Project').new(data_dir + 'test_tasks.mpp')

		# Get the Resource by its ID
		resource = project.getResources().getByUid(1)

		prj = Rjb::import('com.aspose.tasks.Prj')

		# Print Timephased data of ResourceWork
		puts "Timephased data of Resource Work"
		result = resource.getTimephasedData(project.get(prj.START_DATE), project.get(prj.FINISH_DATE)).toList()
		
		i = 0
		while i < result.size()	
			td = result.get(i)
		    puts "Start: " + td.getStart().toString()
		    puts "Work: " + td.getValue()
		    i +=1
		end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
asposetasksjava-0.0.1 lib/asposetasksjava/Resources/readtimephasedresourcedata.rb