I've managed to script up the deviation from nominal and output this in a desired format but I'm having trouble getting the dimensions out out such as Dimension_3D_Distance below is a sample of the code i was trying to use any pointers would be much appreciated thanks in advance.
Sub Main(SNO As String, PARTDIR As String, PARTPRG As String, PART As String)
Dim PCDApp, PCDPartPrograms, PCDPartProgram, PCDCommands, PCDCommand, PCDReport, PCDDataTypes, PCDDataType, PCDFeatCmd
Dim DimT, tX, tY, tZ, mX, mY, mZ, mi, mj, mk, PCDID As String
Dim StrTemp, StrFname, strNetFname, strPFname
Dim m, i As Integer
Dim MyPntMeas, MyPntTheo, MyPntVect
Dim II, JJ, KK, T As Double
Dim DimName() As String
Dim Dims()
Set PCDApp = CreateObject("PCDLRN.Application")
Set PCDPartPrograms = PCDApp.PartPrograms
Set PCDPartProgram = PCDApp.ActivePartProgram
Set PCDCommands = PCDPartProgram.Commands
For iCnt = 1 To PCDCommands.Count
Set PCDCommand = PCDCommands.Item(iCnt)
If PCDCommand.isConstructedFeature Or PCDCommand.Type = 210 Then
Set PCDFeatCmd = PCDCommand.FeatureCommand
Print #1,""
If mid(PCDFeatCmd.ID,6)="_" Then
Print #1,"Section " & Left(PCDFeatCmd.ID,5)
Print #1,""
Else
Print #1,"Section " & Left(PCDFeatCmd.ID,7)
Print #1,""
End If
For m =1 To PCDFeatCmd.NumHits
Set MyPntMeas = PCDFeatCmd.GetHit(m,FHITDATA_CENTROID,FDATA_MEAS,FDATA_PART,"",PLANE_TOP)
Set MyPntTheo = PCDFeatCmd.GetHit(m,FHITDATA_CENTROID,FDATA_THEO,FDATA_PART,"",PLANE_TOP)
Set MyPntVect = PCDFeatCmd.GetHit(m,FHITDATA_VECTOR,FDATA_THEO,FDATA_PART,"",PLANE_TOP)
XM = MyPntMeas.X
YM = MyPntMeas.Y
ZM = MyPntMeas.Z
XN = MyPntTheo.X
YN = MyPntTheo.Y
ZN = MyPntTheo.Z
II = MyPntVect.X
JJ = MyPntVect.Y
KK = MyPntVect.Z