Message 1 of 4
Not applicable
03-22-2013
08:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
My company has a custom property named 'Released date, Type Date.
This date is still empty
I am working on a rule that adds all the custom properties required for the company title block.
This rule can be useful whenever you get a model from a supplier.
I can add a custom property date using the following code:
Dim oDoc As Document = ThisApplication.ActiveDocument
Dim customPropertySet As PropertySet = oDoc.PropertySets.Item("Inventor User Defined Properties")
Try
iProperties.Value("Custom", "Released Date") = iProperties.Value("Custom", "Released Date")
Catch
Dim DateValue As Date = Now 'System.DBNull.Value
customPropSet.Add(DateValue, "Released Date")
End Try
This code works but sets the released date to Now.
But the release date needs to remain blank when adding.
I tried to make the value Null but I get the error:
"Value of type 'System.DBNull' cannot be converted to 'Date'."
Is there a way to keep a custom property date blank?
Thx in advance,
Arnold
Solved! Go to Solution.