Your Products have been synced, click here to refresh
' Replaces a [b]coordinate value[/b] in [b]DCC/measured features[/b] ' with a [b]variable[/b]. The example below replaces the ' theoretical and target Z-coordinate with the contents ' of RChar (currently "W"). ' Custommade for user 233229920 @ PC-DMIS User Forum ' ' Ex. <10,20,30>, <0,0,1> ' (X,Y,Z), (I,J,K) will become ' <10,20,W>, <0,0,1> ' ' vpt.se 2011 Sub Main Dim PCDApp, PCDPartPrograms, PCDPartProgram, PCDCommands, PCDCommand 'Initialization Set PCDApp = CreateObject("PCDLRN.Application") Set PCDPartPrograms = PCDApp.PartPrograms Set PCDPartProgram = PCDApp.ActivePartProgram Set PCDCommands = PCDPartProgram.Commands Dim iCnt As Integer Dim RChar As String RChar = "W" For iCnt = 1 To PCDCommands.Count Set PCDCommand = PCDCommands.Item(iCnt) If (PCDCommand.IsDCCFeature) or (PCDCommand.IsMeasuredFeature) Then retval = PCDCommand.SetExpression (RChar, THEO_Z, 0) retval = PCDCommand.SetExpression (RChar, TARG_Z, 0) End If PCDPartProgram.Refresh Next iCnt 'Cleanup Set PCDCommands = Nothing Set PCDPartProgram = Nothing Set PCDPartPrograms = Nothing Set PCDApp = Nothing End Sub
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |