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

# getphins(3)

retrieve a physical instance

## NAME

getphins - retrieve a physical instance

## SYNOPSYS

```
#include "mph.h"
phins_list ∗getphins(ptfig, insname)
phfig_list ∗ptfig;
char ∗insname;
```

## PARAMETERS

- *ptfig*

  Pointer to the figure in which the instance should be seeked

- *insname*

  Name of the instance

## DESCRIPTION

**getphins** looks in the list of instances of the physical model pointed to by *ptfig* for a instance identified by its *insname*.

## RETURN VALUE

**getphins** returns a pointer to the instance that matches the *insname*.

## ERROR

**"∗∗∗ mbk error ∗∗∗ illegal getphins instance** *insname* **doesn't exist** **in figure** *ptfig-\>NAME***"**

No instance is called *insname* in the figure.

## EXAMPLE

```
#include "mph.h"
phins_list ∗exist(figname, insname)
char ∗figname, ∗insname;
{
   return getphins(getphfig(figname), insname);
}
```

## SEE ALSO

**mbk**(1), [**phfig**(3)](/phfig/3.md), [**phins**(3)](/phins/3.md), [**addphins**(3)](/addphins/3.md), [**delphins**(3)](/delphins/3.md).
