Code Red > .NET
Modify variable with external database
(1/1)
latour_g:
Hi,
How would you change variable FIELDEVAL on this database ?
--- Code - C#: --- Database db = new Database(false, true); string fileName = "C:\bogue\genevieve\Details.dwg"; using (db) { db.ReadDwgFile(fileName, FileShare.ReadWrite, false, ""); // This doesn't change value in the database : // AcadApp.SetSystemVariable("FIELDEVAL", 32); // This doesn't exist : // db.FieldEval = 32; }
Thank you !
n.yuan:
While I am not 100% certain (don't have time to give it a try), you may want to try this:
Autodesk.AutoCAD.DatabaseService.FieldEngine.EvaluationOption=value ; //bitwise value of 0, 1, 2, 4, 8, 16, or a sum of of the values
EvaluationOption is a static property.
latour_g:
Maybe I was doing something wrong but I didn't find FieldEngine in Database.
But by adding HostApplicationServices.WorkingDatabase = db, I realize that AcadApp.SetSystemVariable("FIELDEVAL", 31) works fine.
Thank you !
Navigation
[0] Message Index
Go to full version