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

# GENLIB\_SAVE\_PHSC(3)

save a layout on disk

## NAME

GENLIB\_SAVE\_PHSC - save a layout on disk

## SYNOPSYS

```
#include <genlib.h>
void GENLIB_SAVE_PHSC();
```

## DESCRIPTION

**SAVE\_PHSC** saves the current working figure previously definded by a **DEF\_PHFIG** or **DEF\_PHSC** call, and performs a **DEF\_AB(0L, 0L, 0L, 0L)** just before saving the figure, in order to give it the appropriate size for standard cell blocks. **SAVE\_PHSC** uses environment variables to choose the file format and  the path to the file.\
 No check is made to see if a file with the same name already exists on disk, so be careful not to overwrite some precious data.

## ERROR

**"GENLIB\_SAVE\_PHSC impossible : missing GENLIB\_DEF\_PHFIG"**

No figure has been yet specified by a call to **DEF\_PHFIG** or **DEF\_PHSC. So it isn't** **possible to save anything. you must call DEF\_PHFIG before any other** **layout action.**

## EXAMPLE

```
#include <genlib.h>
main()
{
	/∗ Create a physical figure to work on ∗/
	GENLIB_DEF_PHSC("cell");
	/∗ Place an instance ∗/
	GENLIB_SC_PLACE("finst", NOSYM,0L,0L);
	/∗ Save all that on disk ∗/
	GENLIB_SAVE_PHSC();
}
```

## SEE ALSO

[**genlib**(1)](/genlib/1.md), [**GENLIB\_DEF\_PHSC**(3)](/GENLIB_DEF_PHSC/3.md), [**MBK\_OUT\_PH**(1)](/MBK_OUT_PH/1.md), [**MBK\_WORK\_LIB**(1)](/MBK_WORK_LIB/1.md).
