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

# setlores(3)

set the resistance value of a logical resistor

## NAME

setlores - set the resistance value of a logical resistor

## SYNOPSYS

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

## PARAMETERS

- *ptfig*

  Pointer to the figure in which the resistor should be seeked

- *name*

  Instance name of the resistor

- *newresi*

  New resistance value

## DESCRIPTION

**setlores** looks in the list of resistors of the logical model pointed to by *ptfig* for a resistor identified by its instance *name* and set the RESI field to the newresi value.

## RETURN VALUE

None

## ERRORS

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

No resistor matches the name.

## EXAMPLE

```
#include "mlo.h"
void set_lores_value(char ∗figname,char ∗resname,double newresi)
{
  setlores(getlofig(figname,'A'),resname,newresi) ;
}
```

## SEE ALSO

**mbk**(1), [**lofig**(3)](/lofig/3.md), [**lores**(3)](/lores/3.md), [**addlores**(3)](/addlores/3.md), [**getlores**(3)](/getlores/3.md), [**dellores**(3)](/dellores/3.md).
