Tuesday, October 21, 2008

Set part class dimensions

As far as the QUEST online documentation shows, there is no BCL command for setting a part class' dimensions.

I thought it would be possible to do this by exporting a part class to a text file, modifying the text file with the new dimensions, and then re-importing the text file to overwrite our part class with the new dimensions.

Here is the resulting SCL macro.

You can use it from within SCL by calling set_pclass_dimensions with a handle to the part class, then the 3 arguments to set the part class dimensions to.

You can call it from a BCL script using the following commands, setting the full path to the set_pclass_dimensions.scl file, substituting Part1 with the name of the part class you want, and setting the dimensions to the sizes you want:

SCL_COMPILE 'set_pclass_dimensions.scl' 0
SCL_EXEC set_pclass_dimensions_by_name WITH ARGUMENTS 'Part1' , 100 , 200 , 300

No comments: