This class contains methods for activating and deactivating change info handling.
System.Object
Eplan.EplApi.HEServices.ChangeInfoService
Setting .ArticleTimeStampActive
using (var changeInfoService = new ChangeInfoService { ArticleTimeStampActive = false })
{
part.Properties.PART_LASTCHANGE_DATE = new DateTime(1977, 4, 26);
part.Properties.PART_LASTCHANGE_USER = "TEST_USER";
part.Properties.ARTICLE_DESCR1 = "test_123";
}
//set properties with 'normal' timestamp settings. Will set automatically current time and user
part.Properties.PART_LASTCHANGE_DATE = new DateTime(1977, 4, 26);
part.Properties.PART_LASTCHANGE_USER = "TEST_USER";
part.Properties.ARTICLE_DESCR1 = "test_123";
Setting .ChangeAndCreateInfoUpdateForPage
//deactivate automatic change/create information update
using (var changeInfoService = new ChangeInfoService { ChangeAndCreateInfoUpdateForPage = false })
{
//make artificial change just to check modification date and user
var text1 = new Eplan.EplApi.DataModel.Graphics.Text();
text1.Create(page, "", 10.0);
text1.Remove();
//output changes
Console.WriteLine(page.Properties.PAGE_LASTAUTOMODIFICATIONDATE.ToString());
Console.WriteLine(page.Properties.PAGE_LASTAUTOMODIFICATIONTIME.ToString());
Console.WriteLine(page.Properties.PAGE_LASTMODIFICATOR.ToString());
}
var text2 = new Eplan.EplApi.DataModel.Graphics.Text();
text2.Create(page, "", 10.0);
text2.Remove();
//output changes
Console.WriteLine(page.Properties.PAGE_LASTAUTOMODIFICATIONDATE.ToString());
Console.WriteLine(page.Properties.PAGE_LASTAUTOMODIFICATIONTIME.ToString());
Console.WriteLine(page.Properties.PAGE_LASTMODIFICATOR.ToString());