Results 1 to 2 of 2

Thread: VB6.0-Autocad14 select dimension on a specific layer.

  1. #1
    Join Date
    May 2005
    Posts
    1

    VB6.0-Autocad14 select dimension on a specific layer.

    Hi all,

    Is there a way how I can get the number of dimension on specific layer, by using VB6.0 and AutoCAD 14?

    The program schould run from the command line and open drawings listed in a text file, from there it should check the amount of dimensions on a specific layer, and based on that result it should or should not execute some specific tasks.

    I have a working application which can start AutoCAD and goes thru the listed files, but need a way to get into the drawing database to get the number of dimensions on the specific layer.

    I tried to achieve that by using selection sets but I get following error: Compile Error: User-defined type not defined.

    on the following statement.
    objSelSet As myApp.AcadSelectionSet

    As I'm new to VB/AutoCAD any help is appreciated.

    Thanks in advance.

    Ronnie

  2. #2
    Join Date
    Aug 2005
    Posts
    6
    something like:

    Sub main()
    Dim acadApp As AcadApplication
    Dim d As AcadDimension
    Dim enty As AcadEntity

    Set acadApp = GetObject(, "AutoCAD.Application")
    For Each enty In acadApp.ActiveDocument.ModelSpace

    If TypeOf enty Is AcadDimension Then
    Set enty = d
    If d.Layer = "your dim layer" Then

    End If
    End If
    End Sub

Similar Threads

  1. can a sketch dimension drive a "feature dimension"
    By Gil Alsberg in forum SolidWorks
    Replies: 4
    Last Post: 06-13-2005, 09:10 AM
  2. Replies: 0
    Last Post: 04-01-2005, 10:13 AM
  3. Pick one dimension, select the whole string...
    By CraigV (home) in forum Customization
    Replies: 0
    Last Post: 03-29-2005, 01:47 AM
  4. Dimensions on layer 'Dimension'
    By Kiwi Russ in forum Customization
    Replies: 6
    Last Post: 02-21-2005, 09:18 AM
  5. select LSW layer through skill
    By Giuseppe in forum Cadence
    Replies: 4
    Last Post: 01-25-2005, 02:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other forums: Access Forum - Microsoft Office Forum - Exchange Server Forum