See the top rated post in this thread. Click here

Results 1 to 5 of 5

Thread: Get only all dimensions and check something...

  1. #1
    100 Club
    Join Date
    2008-04
    Location
    St-Ferdinand, Québec
    Posts
    141
    Login to Give a bone
    0

    Default Get only all dimensions and check something...

    Hi guys !

    With the code below, I would like to check something on each dimensions and I dont know why, as soon I call my command, my autocad crashes (Fatal Error)

    Is someone could help me I would appreciate very much !

    Code:
    Imports Autodesk.AutoCAD.Runtime
    Imports Autodesk.AutoCAD.Interop
    
    Public Class CheckDimTextOverride
        <CommandMethod("cto")> _
        Public Sub cto()
    
            Dim MyEnt As Object
            Dim myObjIds As Autodesk.AutoCAD.DatabaseServices.ObjectIdCollection
            Dim MyDim As Common.AcadDimension
    
            For Each MyEnt In myObjIds
                If TypeOf MyEnt Is Common.AcadDimension Then
                    MyDim = MyEnt
                    MsgBox(MyDim.TextOverride)
                End If
            Next
        End Sub
    
    End Class
    Thanks in advance !

  2. #2
    Active Member
    Join Date
    2009-08
    Posts
    93
    Login to Give a bone
    0

    Default Re: Get only all dimensions and check something...

    You never intialize the collection
    e.g. -- myObjIds = new ObjectIdCollection

    Then you need to add ObjectId's to the collection.

    1-- Create a new Instance
    2-- Add ids

  3. #3
    100 Club
    Join Date
    2008-04
    Location
    St-Ferdinand, Québec
    Posts
    141
    Login to Give a bone
    0

    Default Re: Get only all dimensions and check something...

    Hi, because I'm a beginner, could you give me a sample, I would greatly appreciated !

    Thanks in advance !

  4. #4
    Active Member
    Join Date
    2009-08
    Posts
    93
    Login to Give a bone
    1

    Default Re: Get only all dimensions and check something...

    Looking for overriden text in dimension?
    LINK

  5. #5
    100 Club
    Join Date
    2008-04
    Location
    St-Ferdinand, Québec
    Posts
    141
    Login to Give a bone
    0

    Default Re: Get only all dimensions and check something...

    Thank you, your link helped me a lot !!!

Similar Threads

  1. Aligned dimensions acting like linear dimensions (only up-down, left-right on page as viewed)
    By browns.joseph308864 in forum Revit Architecture - General
    Replies: 1
    Last Post: 2011-12-07, 01:48 AM
  2. The 'Check Circuits' in the 'Check Systems' ribbon no longer works in 2012.
    By Wish List System in forum Revit MEP - Wish List
    Replies: 0
    Last Post: 2011-11-01, 06:26 PM
  3. Check In - Check Out en Vault
    By mbravo333 in forum AutoCAD Civil 3D - General
    Replies: 0
    Last Post: 2009-10-29, 03:12 PM
  4. Replies: 8
    Last Post: 2007-05-08, 01:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •