VB6.0-Autocad14 select dimension on a specific layer.
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
VB6.0-Autocad14 select dimension on a specific layer.

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
ronniez



Joined: 18 May 2005
Posts: 1

Posted: Wed May 18, 2005 8:42 pm    Post subject: VB6.0-Autocad14 select dimension on a specific layer. Reply with quote

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

Back to top
View user's profile Send private message
humberto



Joined: 26 Aug 2005
Posts: 6

Posted: Sat Aug 27, 2005 6:29 am    Post subject: re:VB6.0-Autocad14 select dimension on a specific layer. Reply with quote

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
Back to top
View user's profile Send private message
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB