hexagon logo

remove Axis from Dimension

This is translated from a reply from mkopesky. He did the code in a language similar to cypress express and I just made changes so it would run as a basic script.

This will remove the T value from all dimensions in a program.

feel free to tweak as needed. No express guarantees.

Dim dmisapp as object
dim dmispart as object
dim DmisCommands as Object
dim DmisCommand as Object


sub part1


set DmisApp = CreateObject("PCDLRN.Application")
set DmisPart = DmisApp.ActivePartProgram
Set DmisCommands = DmisPart.Commands
CommandCount = DmisCommands.Count
Set DmisCommand = DmisCommands.Item(CommandCount)


for each DmisCommand In DmisCommands
  if DmisCommand.IsDimension Then
      If DmisCommand.Type = Dimension_T_Location tHen
           DmisCommand.Remove
      End If
  End If


next


end sub


sub main


part


dmispart.RefreshPart
End Sub