public static void PutSymbol()
{
Document d = Application.DocumentManager.MdiActiveDocument;
Database db = d.Database;
// Create a list
TypedValue[] tValue = new TypedValue[7];
tValue.SetValue(new TypedValue((int)LispDataType.ListBegin), 0);
tValue.SetValue(new TypedValue((int)LispDataType.Text,
"Main List Item 1"), 1);
tValue.SetValue(new TypedValue((int)LispDataType.ListBegin), 2);
tValue.SetValue(new TypedValue((int)LispDataType.Text,
"Nested List Item 1"), 3);
tValue.SetValue(new TypedValue((int)LispDataType.Text,
"Nested List Item 2"), 4);
tValue.SetValue(new TypedValue((int)LispDataType.ListEnd), 5);
tValue.SetValue(new TypedValue((int)LispDataType.ListEnd), 6);
d.SetLispSymbol("lst", tValue);
}
public static void GetSymbol()
{
Document d = Application.DocumentManager.MdiActiveDocument;
Editor ed = d.Editor;
PromptResult res = ed.GetString("\nName of lisp-Symbol name: ");
if (res.Status == PromptStatus.OK)
{
TypedValue[] tValue = (TypedValue[])d.GetLispSymbol(res.StringResult);
if (tValue == null) return;
foreach (TypedValue tV in tValue)
{
ed.WriteMessage("\n");
ed.WriteMessage(tV.TypeCode + "," + tV.Value);
}
}
}