Solved

How to add new Data Types to a class module?

Posted on 2004-10-18
3
269 Views
Last Modified: 2008-03-17
Hello,

In VB6, I am trying to create with the Class Builder a class module to store all my initialization variables. Ultimately, the class will be imported in an (ESRI) ArcMap VBA  module. The generic ESRI objects are stored in ESRI ArcMap Object Library. So, when I create a new VB project, I make sure that this library is referenced . Then I proceed with creating the class itself in Class Builder. However, the only return Data Types I see are the basic ones - Byte, Boolean, Integer, String, Variant, etc., - that is I don't see any of the typical ArcMap objects, like IFeatureClass etc.

My question is - if I create a property, do I have to set it to Variant in order to cast it later to the ArcMap IFeatureClass type? Am I missing something? The alternative probably is to create the class directly in ArcMap VBA, but I'd rather use the Class Builder because it stubs all the properties and methods for me.

I realize that probably not many VB experts have experience with ArcMap but the question is valid for any VBA programming environment (Excel, Access, etc.)

Thank you for any ideas.
0
Comment
Question by:valboy
3 Comments
 
LVL 14

Accepted Solution

by:
Shiju Sasidharan earned 125 total points
ID: 12340798
hi
i am not familiar with ArcMap
u try this
create a small class with only properties that u need to include in ur user-defined data-type
and create an object of this class in the main class where u needed the Datatype
only difference is instead of using
'----------------------------
 Type  UserDefinedData
    'Variables....
 

 end Type  

'-----------------------
try to use the opjects of the created class

Shiju
0
 

Author Comment

by:valboy
ID: 12342722
Shiju,

Thank you for the advice. I did post on another forum, too, because I was pressed for time and the few answers there  gave me some ideas. For the complete thread see http://forums.devx.com/showthread.php?s=&postid=398160#post398160.

Valentina



0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question