Write a Slice to a Composite Table

  • 20 September 2022
  • 2 replies

Badge +3

Hey! I'm trying to export using AXLL and have been able to write single variables and simple composite tables, but can't figure out how to slice a variable. I'm not sure if this is something I haven't learned about Sets or something with WriteCompositeTable.

I want to do this:

my_set := {A(x, ‘Blue’), B(x)}

             IdentifierReference : my_set,
             TopLeftCell : "A1");

It's the ‘Blue’ part that I can't figure out.

Thanks in advance!


Best answer by Chris Kuip 21 September 2022, 08:29

View original

2 replies

Userlevel 5
Badge +7



The procedure axll::WriteCompositeTable expects as its first argument a subset of AllIdentifiers. The set AllIdentifiers is just the names of the identifiers; it does not include slices. 

A way to get your example to work is to introduce a name for that slice as follows:

Parameter ASlice {

    IndexDomain: x;

    Definition: A(x, 'Blue');



Now you can assign my_set and use it as follows:


my_set := data { ASlice, B } ;

axll::WriteCompositeTable( my_set, "A1" );


In the attachment you'll find a small example.

Badge +3

I knew it would be simple. Thanks for humoring me!


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator