.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
David9818
789 Views, 2 Replies

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

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!

 

Tags (1)
2 REPLIES 2
Message 2 of 3
hgasty1001
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

 

 

 

Message 3 of 3
David9818
in reply to: hgasty1001

I am using AutoCAD 2010. It works great. Thanks Gaston!
David

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost