Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

C3D 2009 VBA Points/Parcels SetUserDefinedPropertyValue Problem

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
424 Views, 2 Replies

C3D 2009 VBA Points/Parcels SetUserDefinedPropertyValue Problem

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
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

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
Message 3 of 3
TerryDotson
in reply to: Anonymous

Nothing like finding a nine (9) year old post of your own and realizing the answer (COM/VBA) is still the only way to access Parcel UDP?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report