.NET

.NET

Reply
Member
3 Posts
0 Kudos
Registered: ‎09-18-2013
Post 1 of 3
Accepted Solution

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

124 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!

 

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

 

 

 

Distinguished Mentor
582 Posts
91 Kudos
Registered: ‎04-11-2010
Post 2 of 3

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
3 Posts
0 Kudos
Registered: ‎09-18-2013
Post 3 of 3

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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!