*Expert Elite*
Posts: 900
Registered: ‎03-13-2008
Message 1 of 2 (186 Views)

# Need Help with MvPart PrtSN Calculation.

186 Views, 1 Replies
05-16-2012 08:31 AM

I am having an issue with creating a calculation for the the PrtSN of a mvpart.  I have created 10 sizes of a part.  2 of the model parameters of the mvpart are set to a list that contains only the values of 1.0 and 0.0.  This will create 40 different sizes of the mvpart.  This is working great.  I can go in and view the parts in the model and all of the geometry is correct.  Autocad MEP has taken the 10 different sizes I created and created 4 versions of each size for a total of 40 parts.  Perfect.  The problem arises in my calculations of the part size name.  Below is the formula that I am using for the name calculation field.

If ((HAND = 1.00) AND (Coil_Hand = 1.00)) Then

PrtSN = Manufacturer PartArticleFig  Right Hand VAV Box with Right Hand Reheat Coil

ElseIf ((HAND = 1.00) AND (Coil_Hand = 0.00)) Then

PrtSN = Manufacturer PartArticleFig Right Hand VAV Box with Left Hand Reheat Coil

Elseif ((HAND = 0.00) and (Coil_Hand = 1.00)) Then

PrtSN = Manufacturer PartArticleFig Left Hand VAV Box with Right Hand Reheat Coil

Elseif ((HAND = 0.00) and (Coil_Hand = 0.00)) Then

PrtSN = Manufacturer PartArticleFig  Left Hand VAV Box with Left Hand Reheat Coil

End If

The formula is seeing that HAND equals both 1.00 and 0.00 just fine but it is always seing Coil_Hand as 0.00.  Even when the part has a Coil_Hand value of 1.00 it is naming the part incorrectly.  I am assuming that it is not reading my AND operator correctly but I do not know of any other way to code this.  Any help would be greatly appreciated.

AutoCAD MEP 2014 | Revit 2014 | EastCoast CAD/CAM V6.1 | Visual Studio 2013
*Expert Elite*
Posts: 900
Registered: ‎03-13-2008
Message 2 of 2 (181 Views)

# Re: Need Help with MvPart PrtSN Calculation.

05-16-2012 10:19 AM in reply to: Keith.Brown

Ok, I figured out what the issue was.  Even though I was using the Insert button to insert my parameters into the formula it was not recognizing Coil_Hand as a parameter.  I found this out by looking at the xml file and at the calculation.  The \$ sign was missing from in front of Coil_Hand.  As soon as I manually entered in the \$ sign the formula started to work correctly!

AutoCAD MEP 2014 | Revit 2014 | EastCoast CAD/CAM V6.1 | Visual Studio 2013

Recently Solved