Results 1 to 7 of 7

Thread: VB.NET and 2005

  1. #1
    AUGI Addict MikeJarosz's Avatar
    Join Date
    2003-09
    Location
    New York NY
    Posts
    1,004

    Default VB.NET and 2005

    I recently noticed that 2005 has a acdbmgd.dll file.

    Does this mean I can write VB.NET code for 2005? Up to now, I have only used VBA with 2005. But I recently returned from the ADN developer camp in Boston with visions of Acad 2008 and Revit API applications. But the bulk of my work is still basically in 2005.

    Have I been missing something in 2005?
    "everything you know is wrong...." -FST

  2. #2
    Forum Manager, Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    4,776

    Default Re: VB.NET and 2005

    Yes, but 2005 was the first release of the api and its not as complete.
    C:> ED WORKING....

  3. #3
    AUGI Addict MikeJarosz's Avatar
    Join Date
    2003-09
    Location
    New York NY
    Posts
    1,004

    Default Re: VB.NET and 2005

    WOW!

    Another reason to loose sleep. Actually, being new to .NET, I have to learn it. Watching ADN guys in Boston write code right in front of us, I realize there is a lot to learn. It makes it easier when I'm not learning Revit or Acad 2008 at the same time.
    "everything you know is wrong...." -FST

  4. #4
    AUGI Addict
    Join Date
    2006-12
    Posts
    1,495

    Default Re: VB.NET and 2005

    Quote Originally Posted by MikeJarosz View Post
    WOW!

    Another reason to loose sleep. Actually, being new to .NET, I have to learn it. Watching ADN guys in Boston write code right in front of us, I realize there is a lot to learn. It makes it easier when I'm not learning Revit or Acad 2008 at the same time.
    Buckle your seatbelt - .NET is not for the faint of heart, especially if you don't have a programming background. I do, and I'm still wrapping my head around some of this stuff. Have *barely* started looking at the AutoCAD side of it... brain... hurts...
    If you are going to fly by the seat of your pants, expect friction burns.
    Windows XP is now over 10 years old, in software terms it makes Joan Collins look like the new kid on the block. - Statler
    Everyone else being wrong is not the same thing as being right.

  5. #5
    All AUGI, all the time
    Join Date
    2003-12
    Location
    Northern California
    Posts
    561

    Default Re: VB.NET and 2005

    Quote Originally Posted by dgorsman View Post
    Buckle your seatbelt - .NET is not for the faint of heart, especially if you don't have a programming background. I do, and I'm still wrapping my head around some of this stuff. Have *barely* started looking at the AutoCAD side of it... brain... hurts...
    Naw, it's not so bad.....as long as you have padded your desk.... slamming of the forehead onto said desk does hurt without the padding.

  6. #6
    AUGI Addict MikeJarosz's Avatar
    Join Date
    2003-09
    Location
    New York NY
    Posts
    1,004

    Default Re: VB.NET and 2005

    Actually, I have written one NET application for Revit.

    You're right though to warn that it is a big step up from VBA. VBA is really for hobbyists. VB.NET is for serious programming. Although I'm not a professional programmer with a degree in computer science, I could have been one. Instead I chose Architecture.
    "everything you know is wrong...." -FST

  7. #7
    Member
    Join Date
    2007-11
    Posts
    5

    Default Re: VB.NET and 2005

    Code:
    using System;
    using System.Data;
    using System.Configuration;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using OSGeo.MapGuide; 
    
    public partial class _Default : System.Web.UI.Page
    {
        public string sessionId;
        public string webLayout;
        public string url;
        protected void Page_Load(object sender, EventArgs e)
        {
            //string config = @"c:Arquivos de programasMapGuideOpenSourceWebServerExtensionswwwwebconfig.ini";
            string config = @"c:\Arquivos de programas\MapGuideOpenSource\WebServerExtensions\www\webconfig.ini";
            
            MapGuideApi.MgInitializeWebTier(config);
    
            MgSite site = new MgSite();
          
    
            MgUserInformation info = new MgUserInformation("Administrator", "admin");
            site.Open(info);
    
            site.Open(info);
            sessionId = site.CreateSession();
            
            
             webLayout = "Library://YorPaste/YourLayout.WebLayout";
             url = "/mapguide/mapviewerajax/?SESSION=" + sessionId + "&WEBLAYOUT=" + webLayout;
        }
    }
    In CS Page...





    Code:
    <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Untitled Page</title>
    </head>
    <body bgcolor=blue>
        <form id="form1" runat="server">
        
        <p>
            <asp:Label ID="lblURL" runat="server" Text="Label"></asp:Label>
        </p>    
        
        <iframe id="viewerFrame" 
            width="100%" 
            height="80%" 
            frameborder="0" 
            scrolling="no" 
            src="<% = url %>">
        </iframe>  
        
        </form>
    </body>
    </html>
    In Aspx html


    Sample of code for use Mapguide Enterprise with Visual Studio .NET 2005 C#
    Last edited by Opie; 2007-11-19 at 05:08 PM. Reason: [CODE] tags added

Similar Threads

  1. ADT 2005 to AutoCAD 2007 back to ADT 2005
    By yoshi.honda in forum ACA General
    Replies: 3
    Last Post: 2006-07-12, 05:50 AM
  2. Importing MD 2005 2D fastener library parts into AutoCAD 2005
    By garyp.97584 in forum AutoCAD General
    Replies: 2
    Last Post: 2005-10-18, 09:43 PM
  3. Map 3D 2005 and Raster 2005 conflicts?
    By blong in forum Raster Design - General
    Replies: 2
    Last Post: 2004-07-15, 03:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •