Book a Demo

Author Topic: Create boundary symbol in a diagram  (Read 4599 times)

MagnusH

  • EA User
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Create boundary symbol in a diagram
« on: January 13, 2010, 04:59:49 pm »
Hi,

I have problem with creating a solid boundary symbol in a diagram. I cannot find any method to change it from nofilled. Any idea?

Regards,
Magnus

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Create boundary symbol in a diagram
« Reply #1 on: January 13, 2010, 07:07:15 pm »
Magnus,

In the database this is seems to be related to the column BorderStyle on the t_object table.
If you can access it through the API then it will probably be through the StyleEx field.

Geert

PS. The way I usually try to figure this out is to create a new eap file and create only the objects I'm interested in. (in this case two boundaries) and then use MS Access to figure out where EA has stored which information.

MagnusH

  • EA User
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: Create boundary symbol in a diagram
« Reply #2 on: January 14, 2010, 02:10:03 am »
Geert,

Thanks for the quick response. Yes, I found the column as well but as far as I can see after testing the StyleEx is not containing this information. I give up.

Thanks,
Magnus

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Create boundary symbol in a diagram
« Reply #3 on: January 14, 2010, 09:16:36 am »
Quote
Geert,

Thanks for the quick response. Yes, I found the column as well but as far as I can see after testing the StyleEx is not containing this information. I give up.

Thanks,
Magnus
Hi Magnus,

The boundary type is configurable on a per-diagram basis (I think).  Check out ObjectStyle in t_diagramobjects.

HTH,
Paolo
« Last Edit: January 14, 2010, 09:19:13 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

MagnusH

  • EA User
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: Create boundary symbol in a diagram
« Reply #4 on: January 14, 2010, 06:14:45 pm »
Hi Paolo,

I found it :-)

It's in the properties Attribute of the boundary element. It's a collection of Property attributes and the name to search for is "BorderStyle". If I change the value to "Solid" it works as expected!

A piece of Perl code:
Code: [Select]
sub ChangeBorderStyle
{
  my ($self, $Element, $Style) = @_;
  for my $PropIndex (0 .. $Element->{Properties}->{Count}-1)
  {
    my $Property = $Element->{Properties}->Item($PropIndex);
    if ($Property->{Name} eq "BorderStyle")
    {
      $Property->{Value} = $Style;
    }
  }    
}
Thanks for the help,
Magnus