Translation Issues

Oct 11, 2012 at 8:40 AM

The following function always returns true when running a model in French.

public bool IsScheduled
    get { return ResourceName != "Unspecified"; }

A better way would be:

public new bool IsScheduled {
    get {
        return base.PreactorObjectModel.Preactor.PlanningBoard.IsOperationScheduled(base.RecordNumber);

* Please note that the replacement suggestion was written to override the existing function, and may require some changes if being implemented in POM.

** The replacement function requires a P400 or higher.


Another alternative (and localization friendly version) would be to read the Resource field as a number, and check if it is "-1"

Oct 11, 2012 at 9:48 AM

Hi Alwyn,

We have been toying with the idea of using a .ReadFieldInt() on the Resource field and check for -1, as you mentioned, but came across a TDF file that had a FREE FORMAT classification on the Resource field, which then returns an error when using ReadFieldInt(). So left things as they are...

Now that you bring this up I think we should try and solve this for good. We could check the TDF to see if a FREE FORMAT classification is used on the Resource field and then warn the user to remove the classification in order for POM to work correctly.

Or we could use the IsOperationScheduled()?

Oct 12, 2012 at 12:35 AM

Hi Alwyn,

POM has been updated and the fix can be found in Nuget package 103, or download the latest commit. You can see the changes in the changelog

A TdfValidator class has also been added to POM to ensure critical information in the TDF is correct. For now it only checks whether the Resource field in the Orders format doe not have a FREE FORMAT classification. We plan on adding more checks in time. If you think of any please let us know.