.NET

.NET

Reply
Member
David9818
Posts: 3
Registered: ‎09-18-2013
Message 1 of 3 (99 Views)
Accepted Solution

How to lock the format of a Table Cell in C#

99 Views, 2 Replies
05-06-2014 10:42 AM

Hi, I have created a table with several cells and wanted to lock the cell format in C#. I have searched the web and couldn't find anything about that. Could someone shed me some light on how to do this? Thanks a lot!

 

Valued Mentor
gasty1001
Posts: 466
Registered: ‎04-11-2010
Message 2 of 3 (92 Views)

Re: How to lock the format of a Table Cell in C#

05-06-2014 12:48 PM in reply to: David9818

Hi,

 

Depending of the Autocad version you can use SetCellState (it's obsolete now, but I don't know since when) or Table.Cells[i,j].State to lock the format of a table cell, this are the permited cell states:

 

[Wrapper("AcDb::CellState"), Flags]
public enum CellStates {
  ContentLocked = 1,
  ContentModifiedAfterUpdate = 8,
  ContentReadOnly = 2,
  FormatLocked = 0x10,
  FormatModifiedAfterUpdate = 0x40,
  FormatReadOnly = 0x20,
  Linked = 4,
  None = 0
}

 

Gaston Nunez

 

 

 

Member
David9818
Posts: 3
Registered: ‎09-18-2013
Message 3 of 3 (80 Views)

Re: How to lock the format of a Table Cell in C#

05-07-2014 06:15 AM in reply to: gasty1001
I am using AutoCAD 2010. It works great. Thanks Gaston!
David
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.