Solved

How to add new Data Types to a class module?

Posted on 2004-10-18
3
273 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month7 days, 16 hours left to enroll

617 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