Results 1 to 3 of 3

Thread: ObjectType is obsolete

  1. #1
    Member
    Join Date
    2007-06
    Posts
    17
    Login to Give a bone
    0

    Default ObjectType is obsolete

    I have this part of the code:

    FamilySymbol fs = list[0].ObjectType as FamilySymbol;

    which is throwing a warning in my compiler saying

    [Warning 2 'Autodesk.Revit.DB.Element.ObjectType' is obsolete: 'Use Element.GetTypeId() and Element.ChangeTypeId() instead.' G:\ProjectX\Tool\FormPanelArea.cs 166 28 ProjectX]...

    This is a project C# file that I got from the SDK samples [[…\Revit2011SDK\Software Development Kit\Samples\Massing\MeasurePanelArea\]

    I am wondering if the warning message is showing up because there are changes in API from revit 2010 to 2011.

    Thank you

  2. #2
    Active Member
    Join Date
    2008-02
    Posts
    58
    Login to Give a bone
    0

    Default Re: ObjectType is obsolete

    Yes, you'll find that the 2011 API has significant changes over the 2010 API.

  3. #3
    Member
    Join Date
    2010-08
    Posts
    3
    Login to Give a bone
    0

    Default Re: ObjectType is obsolete

    I have also had the same problem when copying the Material Properties "example". It does not work and I get the same error message. I have tried every permutation of syntax but I have hit a brick wall. Has anyone ou there got the correct replacement syntax for

    Dim type As Autodesk.Revit.DB.ElementType = elem.ObjectType

Similar Threads

  1. Are Dual Xeons Obsolete for CAD?
    By russkeller5389852 in forum Hardware
    Replies: 8
    Last Post: 2014-09-18, 04:33 PM
  2. Is AutoCAD Obsolete
    By PRSS in forum AutoCAD General
    Replies: 14
    Last Post: 2012-07-19, 08:31 PM
  3. HSS 18X12 obsolete
    By ron.sanpedro in forum Revit Architecture - General
    Replies: 0
    Last Post: 2008-09-03, 10:25 PM
  4. Scope Boxes Obsolete?
    By jcoe in forum Revit Architecture - General
    Replies: 4
    Last Post: 2007-05-01, 06:14 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
  •