Results 1 to 3 of 3

Thread: Namespace Problem

  1. #1
    Active Member
    Join Date
    2006-05
    Location
    Pind
    Posts
    80
    Login to Give a bone
    0

    Default Namespace Problem

    i added the namespace even but than even it does not work.


    Imports Autodesk.Revit.ApplicationServices
    Imports Autodesk.Revit.Attributes
    Imports Autodesk.Revit.DB
    Imports Autodesk.Revit.DB.Events
    Imports Autodesk.Revit.DB.Architecture
    Imports Autodesk.Revit.DB.Structure
    Imports Autodesk.Revit.DB.Mechanical
    Imports Autodesk.Revit.DB.Electrical
    Imports Autodesk.Revit.DB.Plumbing
    Imports Autodesk.Revit.UI
    Imports Autodesk.Revit.UI.Selection
    Imports Autodesk.Revit.UI.Events

    Imports Autodesk.Revit.Exceptions
    Imports Autodesk.Revit.Utility
    Imports RvtApplication = Autodesk.Revit.ApplicationServices.Application
    Imports RvtDocument = Autodesk.Revit.DB.Document
    Namespace Removal

    Public Function Execute(ByVal commandData As ExternalCommandData, ByVal message As ref, ByVal elements As ElementSet) As CmdResult
    Dim app As Application = commandData.Application
    Dim doc As Document = app.ActiveDocument

    Dim e As New Element()
    Dim num As Integer = 1
    Dim it As ElementIterator = doc.Elements
    Do While it.MoveNext()
    e = it.Current [as] Element
    Try
    ' get the BuiltInParameter.ALL_MODEL_MARK paremeter.
    ' If the element does not have this paremeter,
    ' get_Parameter method returns null:
    Dim p As Parameter = e.get_Parameter(BuiltInParameter.ALL_MODEL_MARK)
    If p IsNot Nothing Then
    ' we found an element with the
    ' BuiltInParameter.ALL_MODEL_MARK
    ' parameter. Change the value and
    ' increment our value:
    p.Set(num.ToString())
    num += 1
    End If
    Catch ex As Exception
    Util.ErrorMsg("Exception: " & ex.Message)
    End Try
    Loop
    doc.EndTransaction()
    Return CmdResult.Succeeded
    En()
    End Function
    End Namespace

  2. #2
    I could stop if I wanted to
    Join Date
    2007-07
    Location
    London, UK
    Posts
    361
    Login to Give a bone
    0

    Default Re: Namespace Problem

    Did you reference the API dlls?

  3. #3
    Active Member
    Join Date
    2006-05
    Location
    Pind
    Posts
    80
    Login to Give a bone
    0

    Default Re: Namespace Problem

    Yes, I addedd them

Similar Threads

  1. Replies: 3
    Last Post: 2012-12-10, 01:51 PM
  2. 2011: "namespace for closing document is not found"
    By elmoleaf in forum AutoCAD General
    Replies: 3
    Last Post: 2011-03-01, 09:05 PM
  3. VL Namespace mismatch error
    By smiller.74700 in forum AutoLISP
    Replies: 3
    Last Post: 2008-11-21, 03:02 PM
  4. VL namespace mismatch error revisited...
    By Merle.Hall in forum AutoLISP
    Replies: 8
    Last Post: 2004-11-03, 01:46 PM
  5. VL namespace mismatch????
    By treb in forum AutoLISP
    Replies: 3
    Last Post: 2004-09-16, 11:41 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
  •