Author Topic: Why my Visual Studio 2005 doesnt show CogoPoint namespace otomatically?  (Read 1205 times)

0 Members and 1 Guest are viewing this topic.

ekoneo

  • Newt
  • Posts: 66
I try to use a script given belowe. Unfortunatelly I get "The type or namespace name 'CogoPoint' could not be found" error.
My AutoCAD vercion is Civil 3D2012 and Civil 3D 2014. How can I fix this error?
Code: [Select]
     public void renumpnts()

        {

            CivilDocument civdoc = CivilApplication.ActiveDocument;

           using (AcDb.Transaction tr = AcDb.HostApplicationServices.WorkingDatabase.TransactionManager.StartTransaction())

           {

              for (uint i = 1; i < 11; i++)

             {

                   if (!civdoc.CogoPoints.Contains(i))

                       continue;

                    CogoPoint pt = (CogoPoint)civdoc.CogoPoints.GetPointByPointNumber(i).GetObject(AcDb.OpenMode.ForWrite);

                    pt.Renumber(i + 100, PointNumberResolveType.Overwrite);

             }

                tr.Commit();

         }           

       }