I have been trying to capture the Design History iteration number by using the sample code shown below.
I can capture the raw History number but the last digit being chopped off. I am using a main.minor number format. Minor number can go into double digits.
I tried various types of objects including string, double and Object to capture the who iteration number but none worked.
The only solution I found was to send the Design History iteration number to Message Centre and then retrieve the full number from there.
Here's my code:
Attribute VB_Name = "Module1"Sub PrintDesignFileStrings()Dim dblDouble As Double On Error GoTo HandleError Dim oPH As PropertyHandler Set oPH = CreatePropertyHandler(ActiveDesignFile) Dim accessString As String CadInputQueue.SendCommand "HISTORY COMMIT" accessString = "DesignRevisions[0].Number" MsgBox oPH.SelectByAccessString(accessString) MsgBox oPH.GetDisplayString If oPH.GetValue > 0 Then ShowDisplayString oPH, "DesignRevisions[0].Number" Dim strMessageTxt As String Dim tMsg As MessageCenterMessage tMsg = Application.MessageCenter.GetMessage(0) strMessageTxt = tMsg.Message MsgBox strMessageTxt End IfHandleError: Debug.Print Err.DescriptionEnd SubPrivate Sub ShowDisplayString(oPH As PropertyHandler, accessString As String) On Error GoTo HandleError If Not oPH.SelectByAccessString(accessString) Then Debug.Print "NOT FOUND!!" Else Debug.Print oPH.GetDisplayString End If Exit SubHandleError: Debug.Print Err.DescriptionEnd Sub