Author Topic: The PropertyFlags (SheetSet API)  (Read 1578 times)

0 Members and 1 Guest are viewing this topic.

Andrey Bushman

  • Swamp Rat
  • Posts: 864
The PropertyFlags (SheetSet API)
« on: November 25, 2013, 08:52:20 AM »
Hello.

We can create the custom properties in the sheet set through the COM API. The PropertyFlags flag controls interpretation of the custom properties. Both my questions are located in the comments of code:
Code - C#: [Select]
  1. using Ss = ACSMCOMPONENTS17Lib; // Sheet Set
  2. ...
  3. // Create the custom properties for the sheet set:
  4. Ss.AcSmCustomPropertyBag bag = sheet_set.GetCustomPropertyBag();
  5. // The custom property of the sheet set's level
  6. Ss.AcSmCustomPropertyValue sheetset_prop = new Ss.AcSmCustomPropertyValue();
  7. sheetset_prop.InitNew(bag);
  8. sheetset_prop.SetValue("Ivan");
  9. sheetset_prop.SetFlags(Ss.PropertyFlags.CUSTOM_SHEETSET_PROP);
  10. bag.SetProperty("Boss", sheetset_prop);
  11. // The custom property of the sheet's level
  12. Ss.AcSmCustomPropertyValue sheet_prop = new Ss.AcSmCustomPropertyValue();
  13. sheet_prop.InitNew(bag);
  14. sheet_prop.SetValue("Peter");
  15. sheet_prop.SetFlags(Ss.PropertyFlags.CUSTOM_SHEET_PROP);
  16. bag.SetProperty("Supervisor", sheet_prop);
  17. // The empty custom property (unknown level)
  18. Ss.AcSmCustomPropertyValue empty_prop = new Ss.AcSmCustomPropertyValue();
  19. empty_prop.InitNew(bag);
  20. empty_prop.SetValue("This is the empty property's value...");
  21. empty_prop.SetFlags(Ss.PropertyFlags.EMPTY); // What the PropertyFlags.EMPTY means?
  22. bag.SetProperty("empty_property", empty_prop);
  23. // The "is child" custom property (unknown level)
  24. Ss.AcSmCustomPropertyValue child_prop = new Ss.AcSmCustomPropertyValue();
  25. child_prop.InitNew(bag);
  26. child_prop.SetFlags(Ss.PropertyFlags.IS_CHILD); // // What the PropertyFlags.IS_CHILD means?
  27. child_prop.SetValue(true); // I think it is the Boolean value, or the Int32 [1|0] value.
  28. bag.SetProperty("is_child_property", child_prop);
  29. ...

Third question: what the combinations of this flag are allowed?
Thank you.
« Last Edit: November 26, 2013, 02:03:58 AM by Andrey »