---
name: "getrdsmodellist"
section: "3"
platform: "linux"
package: "alliance"
version: "5.1.1-3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/getrdsmodellist"
---

# getrdsmodellist(3)

gets model list of the instances of a figure

## NAME

getrdsmodellist - gets model list of the instances of a figure

## SYNOPSYS

```
#include "rutnnn.h"
 ptype_list ∗getrdsmodellist( Figure )
   rdsfig_list ∗Figure;
```

## PARAMETER

- *Figure*

  The figure which contains the models to extract.

## DESCRIPTION

The *getrdsmodellist* function gets list of instance's models of the figure ´Figure´. The data structure returned "ptype\_list" is defined ( in MBK library mutnnn.h ) as follows :

```
typedef struct ptype
  {
     struct ptype ∗NEXT;  /∗ next pointer                ∗/
     void         ∗DATA;  /∗ generic pointer             ∗/
     long         TYPE;   /∗ type                        ∗/
  } ptype_list;
```

The field ´DATA´ of ptype\_list structure contains the pointer to the rdsfig\_list structure.

## RETURN VALUE

The getrdsmodellist function returns a pointer which is head of pointer's list of the instances's models of the figure. If the list is empty, NULL pointer is returned.

## ERRORS

none

## EXAMPLE :

```
    #include "mphnnn.h"
    #include "mutnnn.h"
    #include "rdsnnn.h"
    #include "rutnnn.h"
    #include "rtlnnn.h"
    main()
     {
      phfig_list  ∗MbkFigure;
      rdsfig_list ∗RdsFigure;
      ptype_list  ∗FigureList;
      ptype_list  ∗ScanFigureList;
      mbkenv();
      rdsenv();
      loadrdsparam();
      MbkFigure        = getphfig("core",'A');
      RdsFigure = figmbkrds(MbkFigure,0,0);
      FigureList = getrdsmodellist( RdsFigure );
      for (
            ScanFigureList  = FigureList ;
            ScanFigureList != (ptype_list ∗) NULL ;
            ScanFigureList  = ScanFigureList->NEXT
          )
        viewrdsfig ( (rdsfig_list ∗) ScanFigureList->DATA );
      . . .
    }
```

## SEE ALSO

**librut,** **Mut**library
