Hi Terry,
Best I could do was to send the following to the Help file system:
"It is not even vaguely clear what a UserDefined Property is.
A line of sample code should be the absolute minimum to make this
comprehensible"
As you did, I also added (through the interface) a test UDP, but was
unable to find it with the API.
Here's the code I used to poke around in R2009, none of which produced
anything meaningful.
Sub TestUDP()
On Error GoTo ErrorHandler
Dim oPar As AeccParcel
Dim v As Variant
getCivilObjects
Set oPar = g_oAeccDoc.Sites.Item(0).Parcels.Item(0)
Set v =
g_oAeccDoc.Sites.Item(0).Parcels.Properties.GetUserDefinedPropertyClassification(aeccUDPClassificationApplyCustom)
g_oAeccDoc.Sites.Item(0).Parcels.Properties.SetUserDefinedPropertyClassification
aeccUDPClassificationApplyAll, "String"
With oPar
v = .GetUserDefinedPropertyValue("arealabelstyle")
End With
Exit Sub
ErrorHandler:
MsgBox "Unable to process data in Sub 'TestUDP' due to:" & vbCrLf &
Err.Description, vbCritical, scMsgHeader
Err.Clear
End Sub ' TestUDP
It could be that the team behind the API is waiting for complaints
before it gets coded.
Regards
Laurie
Terry W. Dotson wrote:
> I'm trying to use this on a Parcel object, the help file says:
>
> -------------------------------------------------------------------
> Parameters Description
> -------------------------------------------------------------------
> userDefinedProperty The property you want to set value(Can pass in
> the property name, or the property object).
>
> value The new value of the specified property.
> -------------------------------------------------------------------
>
> When I pass the UDP name (property name?) and value I receive an
> "Unspecified Error". Perhaps it needs a designation of the
> Classification name along with the UPD name?. My UDP was created in the
> ToolSpace under "Unclassified".
>
> Does anyone have an example of how to use this?
>
> Thanks in advance.
>
> Terry