hexagon logo

End of Dimension....

Has anyone had a program lose the line that says "End of dimension" after True position and location dimensions?

Halfway through the reporting section of a program I have lost these "end of dimension" lines.

The problem is the dimension stays open so if i hit enter at the end of the dimension it just keeps adding more axis. I can not insert dimension's, comments,alignments,variables... nothing! in this area of the program "No legal insertion point below" is the message i get. This goes on for the last 3000 lines of the program.

Currently I am re-dimensioning this section(Which will take a day or two...aargh!) of the program & curious to know why or how this happened.

Any comments?Astonished

I just realized i posted this in the code forum.....Sorry about that..
  • Spaz,

    I know this is an old post, but if you didn't get it by now there's a vb file on the wilcox site that you can dowload and run and it automaticly puts the end of dimension back in. You have to register to get access to it.
  • There ya go spaz....someone answered your question & i believe you have a new bestest friend or bunk buddy
  • Sorry to bump an old thread but I have this issue in CAD++ 2011 MR1 and the above link is dead. Does anyone know where I can currently find the file (or if it will even work on 2011)? I tried searching the PCDMIS site but can't find snot.
  • Sorry to bump an old thread but I have this issue in CAD++ 2011 MR1 and the above link is dead. Does anyone know where I can currently find the file (or if it will even work on 2011)? I tried searching the PCDMIS site but can't find snot.


    Here is the Link for the old Wilcox script repository

    http://www.wilcoxassoc.com/perl/secure/scriptrepository.pl#insertdimensionend.zip
  • Attribute VB_Name = "Insert Position End or Location End"
    Option Explicit
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ''' This script has been created by Wade Burton To replace the End command of
    ''' location Or True position dimensions when they somehow are missing.  We 
    ''' Do Not know how they Get removed, And is a problem when they are missing
    ''' because Then you can Not properly mark/unmark, delete, copy/paste these
    ''' dimensions.  This script searches through the part program And determines
    ''' which dimensions are missing the End commands And inserts the End In
    ''' the appropriate position.  Message boxes will display which dimensions
    ''' have been fixed.
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    
    Sub main()
    
    Dim app As Object
    Dim part As Object
    Dim cmds As Object
    Dim cmd As Object
    Dim dimensionCmd As Object 
    Dim strMessage As String
    Dim strDimensionID As String 
    Dim blnDimensionHasEnd As Boolean 
    Dim intNumMissingLocationEnds  As Integer 
    Dim intNumMissingPositionEnds  As Integer 
    Dim cmdToBeInsertedAfter As Object 
    Dim intCmdType As Integer 
    Dim blnCmdIsMarked As Boolean 
    
    Set app = CreateObject("PCDLRN.Application")
    Set part = app.ActivePartProgram
    Set cmds = part.Commands
    
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    'Sub main()
    
    intNumMissingLocationEnds  = 0
    intNumMissingPositionEnds  = 0
    For Each cmd In cmds
        Set intCmdType = cmd.Type 
        blnCmdIsMarked  = cmd.Marked 
        If intCmdType = DIMENSION_START_LOCATION Or intCmdType = DIMENSION_TRUE_START_POSITION Then 
           blnDimensionHasEnd = False  
           Set dimensionCmd = cmd
           Set  cmdToBeInsertedAfter  = dimensionCmd 
           strDimensionID = "Dimension ID=" & dimensionCmd.ID
           dimensionCmd = dimensionCmd.Next
           'This dimensionCmd should be the command that follows the start of the dimension.  It should be an x,y,z,pa, etc. Or an End command.
           'So we search through the Next group of commands For the End command.  If we hit another start dimension Or a command
           'that is Not part of the current dimension we've gone too far.  If no End exists Then Set the Boolean variable so later we
           'can either Put up a message Or insert the End.     In the numbers of axes, the End comes after the start And the straightness is the last axis In the order.
           Do While (dimensionCmd.Type >= DIMENSION_END_LOCATION And dimensionCmd.Type <= DIMENSION_STRAIGHTNESS_LOCATION) 
             If (dimensionCmd.Type = DIMENSION_END_LOCATION) Then 
               blnDimensionHasEnd = True    
             Else 
               Set cmdToBeInsertedAfter = dimensionCmd
               cmds.InsertionPointAfter cmdToBeInsertedAfter
             End If 
             dimensionCmd.Next 
           Loop 
           Do While (dimensionCmd.Type >= DIMENSION_TRUE_END_POSITION And dimensionCmd.Type <= DIMENSION_TRUE_STRAIGHTNESS_LOCATION) 
             If (dimensionCmd.Type = DIMENSION_TRUE_END_POSITION) Then 
               blnDimensionHasEnd = True    
             Else 
               Set cmdToBeInsertedAfter = dimensionCmd
               cmds.InsertionPointAfter cmdToBeInsertedAfter
             End If 
             dimensionCmd.Next
           Loop 
    
           'If we made it To the End of the dimension And didn't find an End, Then insert a new End
           If blnDimensionHasEnd = False And intCmdType = DIMENSION_START_LOCATION Then 
             intNumMissingLocationEnds = intNumMissingLocationEnds + 1
             strMessage = strDimensionID + " - Location dimension #" + Format(intNumMissingLocationEnds, "")
             MsgBox (strMessage)
             Set cmd = cmds.Add(DIMENSION_END_LOCATION, True)
             If blnCmdIsMarked = True Then
               cmd.Mark 
             End If
           ElseIf blnDimensionHasEnd = False And intCmdType = DIMENSION_TRUE_START_POSITION Then 
             intNumMissingPositionEnds = intNumMissingPositionEnds + 1
             strMessage = strDimensionID + " - Position dimension #" + Format(intNumMissingPositionEnds, "") 
             MsgBox (strMessage)
             Set cmd = cmds.Add(DIMENSION_TRUE_END_POSITION, True)
             If blnCmdIsMarked = True Then
               cmd.Mark 
             End If
           End If 
    
        End If 
    Next cmd
    
    strMessage = intNumMissingLocationEnds & " Location Dimensions with missing End Commands fixed."
    MsgBox (strMessage)
    strMessage = intNumMissingPositionEnds & " Position Dimensions with missing End Commands fixed."
    MsgBox (strMessage)
    
    End Sub
    
    
    


    Here is the InsertDimensionEnd.bas code for the Basic Script Editor.
  • Forum
    Development and Technical Previews
    PC-DMIS 2012 Technical Preview - This forum is now closed to new posts
    "corrupt program" moving dimension summary mode
    This will give you more info on this issue.

    http://www.pcdmisforum.com/showthread.php?22325-quot-corrupt-program-quot-moving-dimension-summary-mode
  • This just happened to me earlier today. I don't know if this is a coincidence or bad voodoo from of digging up this old thread.
  • Baaaad voodoo! When this happened the last time, I had only four locations that lost the End of Dim line. My fix was to delete them and just re-dimension. I wasn't able to access the above link but I'll hang on to the script in case it happens again with more than a few features.