Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello guys
Im trying to do a custom plug in to get the time and date of the start of a process by clicking a button when my CNC programmers star programming a part in the shop and I want another button to get the time and date of the end of the process to get the total amount of hours the task took and send the info to a spreadsheet.
I can get the date but not the hours on the custom Iproperty
is there a way to do this?
Here is my code
Dim datINICIO As String Dim datFIN As Date Dim datTOTAL As Double Private Sub CommandButton1_Click() datINICIO = DATESTRING ' Get the active document. Dim doc As Document Set doc = ThisApplication.ActiveDocument ' Get the custom property set. Dim customPropSet As PropertySet Set customPropSet = doc.PropertySets.Item( _ "Inventor User Defined Properties") Dim customProp1 As Property Set customProp1 = customPropSet.Item("TEST DATE STRING") ' Set the value of the property. customProp1.Value = datINICIO End Sub
Solved! Go to Solution.