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

# unflattenlofig(3)

creates a hierarchy level from instances of a figure

## NAME

unflattenlofig - creates a hierarchy level from instances of a figure

## SYNOPSYS

```
#include "mlo.h"
void unflattenlofig(ptfig, figname, insname, list)
lofig_list ∗ptfig;
char ∗figname;
char ∗insname;
chain_list ∗list;
```

## PARAMETERS

- *ptfig*

  Pointer to a logical figure

- *figname*

  Name of the new figure (model)

- *insname*

  Instance name of the new figure

- *list*

  Pointer to the head of a chain\_list, containing instance pointers

## DESCRIPTION

**unflattenlofig** creates a new figure, *figname*, containing the instances listed in *list*, and adds it in the figure pointed to by *ptfig*, with the name *insname*. \
 All the terminals of the new figure are called using the name of the corresponding signal if it exists, or with the name of a connector connected to this signal. The new name is suffixed with a number, obtained with an internal counter, in order to ensure that names are differents.

## ERRORS

No errors can directly result from a call to **unflattenlofig**, but since it uses many other mbk functions, it may be a good error starting point.

## EXAMPLE

```
#include "mlo.h"
{
 lofig_list *lofig;
 chain_list *list = NULL;
 lofig = getlofig ( "rootfig", 'A');
 list = addchain (list, (void *)getloins (lofig, "nan0");
 list = addchain (list, (void *)getloins (lofig, "nor2");
 unflattenlofig ( lofig, "newfig", "newins", list);
}
```

## SEE ALSO

**mbk**(1), [**mbkenv**(3)](/mbkenv/3.md), [**lofig**(3)](/lofig/3.md), [**getlofig**(3)](/getlofig/3.md), [**addlofig**(3)](/addlofig/3.md), [**addloins**(3)](/addloins/3.md), [**delloins**(3)](/delloins/3.md), [**addlocon**(3)](/addlocon/3.md), [**addlosig**(3)](/addlosig/3.md), [**dellosig**(3)](/dellosig/3.md), [**getsigname**(3)](/getsigname/3.md), [**lofigchain**(3)](/lofigchain/3.md), [**getptype**(3)](/getptype/3.md), [**addptype**(3)](/addptype/3.md), [**delptype**(3)](/delptype/3.md), [**addchain**(3)](/addchain/3.md), [**freechain**(3)](/freechain/3.md), [**reverse**(3)](/reverse/3.md).
