Sunday, February 8, 2015

Subassembly Composer, A Primer -- Part Two, Using Input Parameters


Autodesk Platinum Partner

 
Article by Timothy Corey
Autodesk Civil 3D Certified Professional


You have successfully created a custom subassembly that slopes away at five percent for ten feet. That's pretty cool, but now the designers are complaining that they want to be able to change the slope and offset with Subassembly Properties.

You need to add some input parameters to your subassembly. Here's how.

In Subassembly Composer, go to the Input/Output Parameters tab in the lower right of the screen.


I usually set my Side parameter Default Value to Right. Do as you wish with that.

Press the Create parameter bar (it's a button that looks like a bar, and it's easy to hit it when you don't mean to, making parameters you don't want or need. Be careful, you can't delete a parameter once your press the button.) I called my first parameter User Slope. Set Type to Grade, Direction to Input, Default Value to whatever you want as the default slope and DisplayName to what you want the user to see in the Properties dialog in AutoCAD Civil 3D.



Input the UserOffset parameter using the values above.

A couple of notes: This example uses Grade for UserSlope because I want the default user-input to be in percent. If you want run:rise slope input, use the Type called Slope. I used Integer for the UserOffset Type because I want input to be in whole units. If you want to be able to use decimals, set the Type to Double.

Almost done now, but we need to tell our subassembly point P2 to use these parameters instead of fixed values. In the Flowchart or Preview window, pick P2. On the Properties window, replace the Slope value of -5% with UserSlope. No quotes, just that name. If you mis-type, you will get a red warning symbol, so if you don't see that, you know you typed it correctly.

Replace Delta X of 10 with UserOffset.



Go to the Packet Settings tab and rename the subassembly. While I am building a subassembly, because I might test it in AutoCAD Civil 3D and then come back to Subassembly Composer to tweak it, I use 01, 02, 03 at the end of the subassembly and file names, incrementing each time. This allows me to continue to load versions of my subassembly into AutoCAD Civil 3D without closing and re-opening each time. Use Saveas to save the pkt file.

Go back to Civil 3D and import the updated subassembly.



Erase the previously placed subassembly from the assembly and then place the updated version. Notice that the Properties dialog now lets you input Slope and Offset. Try various values and see how your subassembly changes. In the example below, I have changed the values to 12% and 5 feet of offset.



That's it for part two of this primer. Part three will cover creating targets. Coming soon...

No comments: