Message 1 of 8
Duplicate Declaration Alert

Not applicable
04-12-2001
10:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to make my schedule program more streamline but I am having a
problem Declaring a variable when it comes to the different Objects.
since there are several types of objects that can have Schedule data, in
Arch Desktop, I want
this code to work for all.
If TypeOf obj Is AecDoor Or TypeOf obj Is AecSpace Then
If TypeOf obj Is AecDoor Then
Dim AecObj As AecDoor
End If
If TypeOf obj Is AecSpace Then
Dim AecObj As AecSpace
End If
When I try this I get a Duplicate Declaration Alert. How can I simplify
this so I can dim the AecObj as whatever Object was selected?
Additionally is there a way to do somthing like this.
dim AecObj as TypeOf Obj
this would be so that AecObj would be declared as the TypeOf object
selected. I tried this code and it will not allow it.
Thanks
--
Rob Starz
rob@stardsign.com
Plogv 3.0 & 2000 (plot logging) for r14 & 2000
***Enhancement Tools for Arch. Desktop FREE!!!!*****
http://www.stardsign.com/main.htm
StarDsign cad solution
problem Declaring a variable when it comes to the different Objects.
since there are several types of objects that can have Schedule data, in
Arch Desktop, I want
this code to work for all.
If TypeOf obj Is AecDoor Or TypeOf obj Is AecSpace Then
If TypeOf obj Is AecDoor Then
Dim AecObj As AecDoor
End If
If TypeOf obj Is AecSpace Then
Dim AecObj As AecSpace
End If
When I try this I get a Duplicate Declaration Alert. How can I simplify
this so I can dim the AecObj as whatever Object was selected?
Additionally is there a way to do somthing like this.
dim AecObj as TypeOf Obj
this would be so that AecObj would be declared as the TypeOf object
selected. I tried this code and it will not allow it.
Thanks
--
Rob Starz
rob@stardsign.com
Plogv 3.0 & 2000 (plot logging) for r14 & 2000
***Enhancement Tools for Arch. Desktop FREE!!!!*****
http://www.stardsign.com/main.htm
StarDsign cad solution