I found the structure I believe the Plat Book and Plat Page go in to
Under the property object
PreliminaryTitleOpinion
RecordedPlat
Recording
BookNumber
PageNumber
for example
But I'm not sure how to reference all these sub structures, can I get an idea?
Plat Book and Page
-
- Posts: 1377
- Joined: Wed Jan 15, 2014 3:50 pm
- Location: Raleigh, NC
- Contact:
Re: Plat Book and Page
An order can be thought of as a collection of objects implementing the IOrderItem interface (see the SDK for more information on this class). These items have properties and collections of any type and possibly other IOrderItems. By using the Field Code Browser in Select, you can greatly speed up development by using it to find how to navigate to the area of interest.
For instance, let's add a Book Number to a property recording information. The Field Code Browser shows that it is at "Order.Properties.PreliminaryTitleOpinion.RecordedPlat.Recording.BookLabel". It also shows us (at the bottom of the window) that the type is a string. Next we get the order and descend through child objects until we get it. Notice that "Properties" is plural - that means it is a collection. In this example, I will just pick the first one. (I will use actual static types instead of "var" to make it clearer to others.)
Not all fields are displayed in the Field Code Browser but you can always select a field then press ALT + F6 and a popup will give the same information.
Be aware that if you are comfortable with the dynamic typing with C#, you can do the following. It is slightly slower than using IOrderItems exclusively but many applications are not sufficiently time critical to care.
For instance, let's add a Book Number to a property recording information. The Field Code Browser shows that it is at "Order.Properties.PreliminaryTitleOpinion.RecordedPlat.Recording.BookLabel". It also shows us (at the bottom of the window) that the type is a string. Next we get the order and descend through child objects until we get it. Notice that "Properties" is plural - that means it is a collection. In this example, I will just pick the first one. (I will use actual static types instead of "var" to make it clearer to others.)
Code: Select all
// Get the IOrderItem for the property by navigating down from the Order.
IOrder iOrder = {order object}
IList properties = (IList)iOrder["Properties"];
IOrderItem firstProp= (IOrderItem)properties[0];
IOrderItem prelim = (IOrderItem)firstProp["PreliminaryTitleOpinion"];
IOrderItem recordedPlat = (IOrderItem)prelim["RecordedPlat"];
IOrderItem recording = (IOrderItem)recordedPlat["Recording"];
// Set the value by selecting property name with IOrderItem indexer.
recording["PageLabel"] = "label";
Be aware that if you are comfortable with the dynamic typing with C#, you can do the following. It is slightly slower than using IOrderItems exclusively but many applications are not sufficiently time critical to care.
Code: Select all
// Get the IOrderItem for the property.
//IOrder iOrder = { order object }
IList properties = (IList)iOrder["Properties"];
dynamic firstProp = properties[0];
dynamic prelim = firstProp.PreliminaryTitleOpinion;
dynamic recordedPlat = prelim.RecordedPlat;
dynamic recording = recordedPlat.Recording;
// Set the property value.
recording.PageLabel = "label";
Bob Richards, Senior Software Developer, SoftPro