Alibre API Programming Introduction - Creating a New Part E-mail
Article Index
Alibre API Programming Introduction
Introduction
Internal Units
Connecting to Alibre Design
Creating a New Part
Creating a Sketch
Creating an Extrusion Feature
Saving and Closing the Part
Cleaning Up
All Pages

Creating a New Part

Now we'll create the part and assign a couple of its properties. Note that we're converting from an RGB value of (255,0,0) to a BGR value as an integer. We do this because Alibre Design likes to think of colors in terms of blue-green-red sets of values, and the normal order you see working in Windows is red-green-blue.

' Create a New Part
Dim part As IADPartSession _
    = root.CreateEmptyPart(partName, False)
part.Color = Color.FromArgb(255, 0, 0).ToArgb()
part.Reflectivity = 50

// Create a New Part
IADPartSession part 
    = root.CreateEmptyPart(partName, false);
part.Color = Color.FromArgb(255, 0, 0).ToArgb();
part.Reflectivity = 50;



Last Updated ( Monday, 28 July 2008 00:36 )