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

# setlocap(3)

set the capacitance value of a logical capacitor

## NAME

setlocap - set the capacitance value of a logical capacitor

## SYNOPSYS

```
#include "mlo.h"
void setlocap(ptfig,name,newcapa)
lofig_list ∗ptfig ;
const char ∗name ;
double newcapa ;
```

## PARAMETERS

- *ptfig*

  Pointer to the figure in which the capacitor should be seeked

- *name*

  Instance name of the capacitor

- *newcapa*

  New capacitance value

## DESCRIPTION

**setlocap** looks in the list of capacitors of the logical model pointed to by *ptfig* for a capacitor identified by its instance *name* and set the CAPA field to the newcapa value.

## RETURN VALUE

None

## ERRORS

**"∗∗∗ mbk error ∗∗∗ setlocap impossible :** **capacitor** *name* **doesn't exist in figure** *ptfig -\> NAME***"**

No capacitor matches the name.

## EXAMPLE

```
#include "mlo.h"
void set_locap_value(char ∗figname,char ∗capname,double newcapa)
{
  setlocap(getlofig(figname,'A'),capname,newcapa) ;
}
```

## SEE ALSO

**mbk**(1), [**lofig**(3)](/lofig/3.md), [**locap**(3)](/locap/3.md), [**addlocap**(3)](/addlocap/3.md), [**getlocap**(3)](/getlocap/3.md), [**dellocap**(3)](/dellocap/3.md).
