Sha256: e4a69c816fad27cfcefb3a4200ec3cb01873b735a99c533abd68f58867bbcf8d

Contents?: true

Size: 744 Bytes

Versions: 1

Compression:

Stored size: 744 Bytes

Contents

module Asposetasksjava
  module SetAttributesForNewTasks
    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')

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

        # Set new task property
        project.set(prj.NEW_TASK_START_DATE, Rjb::import('com.aspose.tasks.TaskStartDateType').CurrentDate)

        project.save(data_dir + "set_attributes_for_new_tasks.xml", Rjb::import('com.aspose.tasks.SaveFileFormat').XML)

        puts "Set attributes for new tasks, please check the output file."
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
asposetasksjava-0.0.1 lib/asposetasksjava/Projects/setattributesfornewtasks.rb