from Civil to Inventor

The Autodesk enthusiast exile

Civil 3D – Part Builder Context Solution Part 2

Part Builder Context Solution Part 1

Ok, at last, the end of the journey.  We covered getting the model values out of an existing part.  The remaining issue lies with what to do now that we have a mandatory context added to the structure type.  Each time we create a new form of that structure type, that variable will be added to the Part XML file with all the other OEM required variables, such as "SHBTh".  This would not be a problem except that we still cannot get our non-OEM variables forced into the part model parameters.

As you may recall from earlier discussions, adding an existing catalog parameter to the model parameters is verboten.  Consequently without some assistance, each new part would require yet another context parameter to be created in the list.  Eventually the list of copies of the same variables would be ridiculous.

What we did figure out is that we can link a required context parameter that is created in the part XML, to a parameter we used in the model parameters. 

The basic outline is as follows:

  • Create the new part, using the proper structure type. 
  • Validate the part and save it.
  • Create the model to its completion, adding any model parameters as needed.
  • Configure the Required Context Parameter to be a range or a list as desired.
  • Save the part and exit.
  • Edit the Part XML, and change the MODEL parameter’s equation to equal the Required Context Parameter.
  • Save the file and perform a catalog regen, and a catalog validation.
  • Check the part validation file to confirm all is well.  If it says there is a duplicate parameter, return to the Part XML, find the parameter definition that is a duplicate, and delete it so that only one parameter definition remains

Continue reading

Advertisements

September 22, 2009 Posted by | 2010, AutoCAD Civil 3D, Part Builder | , , , , , , | Leave a comment