How to know if a drawing has ADT or ABS objects
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
How to know if a drawing has ADT or ABS objects

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
adiaz
Guest





Posted: Sat Jan 08, 2005 1:44 am    Post subject: How to know if a drawing has ADT or ABS objects Reply with quote

Hi everyone. I would like to run a batch process on a random set of drawings from my Project's Drive to find and write to a file or count if the drawing has object(s) from Architectural Desktop or Building System. Does anybody has a code to do this? The reason I want to do this is to find out if the user(s) are using the full capabilities from this packages. Look like the users are using this software like simple AutoCAD and does not make sense to upgrade it to 2005. Any help would be greatly appreciate. TIA.

Back to top
Matt W
Guest





Posted: Sat Jan 08, 2005 2:09 am    Post subject: Re: How to know if a drawing has ADT or ABS objects Reply with quote

You could do something like this (to get you started).

For Architectural Desktop
Code:

Sub ADT_Object_Search()
    Dim objEnt As AcadEntity

    For Each objEnt In ThisDrawing.ModelSpace
        If TypeOf objEnt Is AecWall Then
            MsgBox "Found a wall!"
        End If
    Next objEnt
End Sub


For Building Systems
Code:

Sub ABS_Object_Search()
    Dim objEnt As AcadEntity

    For Each objEnt In ThisDrawing.ModelSpace
        If TypeOf objEnt Is AecbDevice Then
            MsgBox "Found a device!"
        End If
    Next objEnt
End Sub


You'll have to add a reference to the AEC Architectural 4.5 Object Library
and the AEC Building Systems 4.5 Object Library.
I'm not sure how you would go about doing a search for ALL AEC (ADT) or AECB
(ABS) objects without adding each type into your code.
In otherwords, I didn't see a global way to test if an object is an AEC
object (whether it's a wall, door, window, etc...).

--
I support two teams: The Red Sox and whoever beats the Yankees.

"adiaz" <nospam@address.withheld> wrote in message
news:3186870.1105130702986.JavaMail.jive@jiveforum1.autodesk.com...
Quote:
Hi everyone. I would like to run a batch process on a random set of
drawings from my Project's Drive to find and write to a file or count if
the drawing has object(s) from Architectural Desktop or Building System.
Does anybody has a code to do this? The reason I want to do this is to
find out if the user(s) are using the full capabilities from this
packages. Look like the users are using this software like simple AutoCAD
and does not make sense to upgrade it to 2005. Any help would be greatly
appreciate. TIA.
Back to top
Matt W
Guest





Posted: Sat Jan 08, 2005 2:11 am    Post subject: Re: How to know if a drawing has ADT or ABS objects Reply with quote

Yes... I know I posted VB code in a LSP NG.

Oops!

I'm not sure how you would go about doing this in LSP or VLISP.

--
I support two teams: The Red Sox and whoever beats the Yankees.

"Matt W" <nospam@address.withheld.com> wrote in message
news:41defaa1$1_1@newsprd01...
Quote:
You could do something like this (to get you started).

For Architectural Desktop
Code:

Sub ADT_Object_Search()
Dim objEnt As AcadEntity

For Each objEnt In ThisDrawing.ModelSpace
If TypeOf objEnt Is AecWall Then
MsgBox "Found a wall!"
End If
Next objEnt
End Sub


For Building Systems
Code:

Sub ABS_Object_Search()
Dim objEnt As AcadEntity

For Each objEnt In ThisDrawing.ModelSpace
If TypeOf objEnt Is AecbDevice Then
MsgBox "Found a device!"
End If
Next objEnt
End Sub


You'll have to add a reference to the AEC Architectural 4.5 Object Library
and the AEC Building Systems 4.5 Object Library.
I'm not sure how you would go about doing a search for ALL AEC (ADT) or
AECB (ABS) objects without adding each type into your code.
In otherwords, I didn't see a global way to test if an object is an AEC
object (whether it's a wall, door, window, etc...).

--
I support two teams: The Red Sox and whoever beats the Yankees.

"adiaz" <nospam@address.withheld> wrote in message
news:3186870.1105130702986.JavaMail.jive@jiveforum1.autodesk.com...
Hi everyone. I would like to run a batch process on a random set of
drawings from my Project's Drive to find and write to a file or count if
the drawing has object(s) from Architectural Desktop or Building System.
Does anybody has a code to do this? The reason I want to do this is to
find out if the user(s) are using the full capabilities from this
packages. Look like the users are using this software like simple AutoCAD
and does not make sense to upgrade it to 2005. Any help would be greatly
appreciate. TIA.



Back to top
adiaz
Guest





Posted: Sat Jan 08, 2005 3:24 am    Post subject: Re: How to know if a drawing has ADT or ABS objects Reply with quote

Thank you Matt. I am not familiar with VBA but if a piece of VBA code appears I'll be very happy.
Back to top
adiaz
Guest





Posted: Sat Jan 08, 2005 3:41 am    Post subject: Re: How to know if a drawing has ADT or ABS objects Reply with quote

My idea is to look for AEC objects in the drawing. I think an easy way to do this is setting the demandload =2 and reading what module aec was/were loaded when the drawing was opened. Any light?
Back to top
Laurie Comerford
Guest





Posted: Sat Jan 08, 2005 6:44 am    Post subject: Re: How to know if a drawing has ADT or ABS objects Reply with quote

Hi Matt,

I haven't tried this, but maybe you could use something like:

For Each objEnt In ThisDrawing.ModelSpace
If NOT TypeOf objEnt Is AcadObject Then
MsgBox "Found a non-standard AutoCAD object!"
End If
Next objEnt

It would depend on how the API defines AcadObject.

Another approach would be to create an collection of each of the types, then
look at the collection data.

--


Laurie Comerford
CADApps
www.cadapps.com.au


"Matt W" <nospam@address.withheld.com> wrote in message
news:41defb07$1_1@newsprd01...
Quote:
Yes... I know I posted VB code in a LSP NG.

Oops!

I'm not sure how you would go about doing this in LSP or VLISP.

--
I support two teams: The Red Sox and whoever beats the Yankees.

"Matt W" <nospam@address.withheld.com> wrote in message
news:41defaa1$1_1@newsprd01...
You could do something like this (to get you started).

For Architectural Desktop
Code:

Sub ADT_Object_Search()
Dim objEnt As AcadEntity

For Each objEnt In ThisDrawing.ModelSpace
If TypeOf objEnt Is AecWall Then
MsgBox "Found a wall!"
End If
Next objEnt
End Sub


For Building Systems
Code:

Sub ABS_Object_Search()
Dim objEnt As AcadEntity

For Each objEnt In ThisDrawing.ModelSpace
If TypeOf objEnt Is AecbDevice Then
MsgBox "Found a device!"
End If
Next objEnt
End Sub


You'll have to add a reference to the AEC Architectural 4.5 Object
Library
and the AEC Building Systems 4.5 Object Library.
I'm not sure how you would go about doing a search for ALL AEC (ADT) or
AECB (ABS) objects without adding each type into your code.
In otherwords, I didn't see a global way to test if an object is an AEC
object (whether it's a wall, door, window, etc...).

--
I support two teams: The Red Sox and whoever beats the Yankees.

"adiaz" <nospam@address.withheld> wrote in message
news:3186870.1105130702986.JavaMail.jive@jiveforum1.autodesk.com...
Hi everyone. I would like to run a batch process on a random set of
drawings from my Project's Drive to find and write to a file or count
if
the drawing has object(s) from Architectural Desktop or Building
System.
Does anybody has a code to do this? The reason I want to do this is to
find out if the user(s) are using the full capabilities from this
packages. Look like the users are using this software like simple
AutoCAD
and does not make sense to upgrade it to 2005. Any help would be
greatly
appreciate. TIA.



Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization 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