# Quick Mel Attribute Question

**URL:** https://forum.highend3d.com/t/quick-mel-attribute-question/1528
**Category:** Maya
**Tags:** mel
**Created:** [May 3, 2008, 12:04am UTC](https://forum.highend3d.com/t/quick-mel-attribute-question/1528 "2008-05-03T00:04:57Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![virtual\_gravity](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/v/dfb087/32.png) [@virtual\_gravity](https://forum.highend3d.com/u/virtual_gravity)
#### Post date: [May 3, 2008, 12:04am UTC](https://forum.highend3d.com/t/quick-mel-attribute-question/1528/1 "2008-05-03T00:04:57Z")

</div>

Quick simple question,  
I have a value from a distance node connected to an input of a condition node.  
I would like to take the original value from that input and put it into an input of a multiply divide node but not connect it.  
for example:

I'm creating a stretchy arm using MEL.  
I want the arm to stretch only if it is longer than the original length.  
So I have the distance node from the shoulder to the wrist, I've connected the distance attribute to the first term of a condition node.  
Now, instead of manually typing in the original length of the arm into the second term of the condition node, what's the MEL command for doing that?  
I've tried this:

setAttr "character\_cdn.secondTerm" "character\_cdn.firstTerm";  
setAttr "character\_cdn.secondTerm" = "character\_cdn.firstTerm";

Any suggestions?

Thanks

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [May 3, 2008, 3:15pm UTC](https://forum.highend3d.com/t/quick-mel-attribute-question/1528/2 "2008-05-03T15:15:26Z")

</div>

connectAttr

---

<div class="post-metadata">

### Author: ![virtual\_gravity](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/v/dfb087/32.png) [@virtual\_gravity](https://forum.highend3d.com/u/virtual_gravity)
#### Post date: [May 3, 2008, 7:16pm UTC](https://forum.highend3d.com/t/quick-mel-attribute-question/1528/3 "2008-05-03T19:16:59Z")

</div>

Thanks Joojaa,  
but I don't want to have the attributes connected.  
I just want to input the initial value from one into the second, and from then on the second won't change.  
At the moment, I'm inputting it manually, but I'd like to set it up in MEL.

Thanks again for your help!

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [May 3, 2008, 11:57pm UTC](https://forum.highend3d.com/t/quick-mel-attribute-question/1528/4 "2008-05-03T23:57:21Z")

</div>

ahh you want

setAttr character\_cdn.secondTerm `getAttr character\_cdn.firstTerm`;

then? Or the other way around. Quite fundqamentakl understanding of programming stuff here.

QUOTE  
and from then on the second won't change.

In that case you must lock the attr after the fact, or just leave it be and pray users dont change it ![]()

---

<div class="post-metadata">

### Author: ![virtual\_gravity](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/v/dfb087/32.png) [@virtual\_gravity](https://forum.highend3d.com/u/virtual_gravity)
#### Post date: [May 4, 2008, 4:12pm UTC](https://forum.highend3d.com/t/quick-mel-attribute-question/1528/5 "2008-05-04T16:12:36Z")

</div>

QUOTE(Joojaa @ 05/03/08, 04:57 PM) [snapback]285030[/snapback]  
ahh you want   
setAttr character\_cdn.secondTerm `getAttr character\_cdn.firstTerm`;  
then? Or the other way around. Quite fundqamentakl understanding of programming stuff here.  
In that case you must lock the attr after the fact, or just leave it be and pray users dont change it ![]()

That's exactly what I wanted, thanks so much Joojaa.
