Hide Table of Contents
IAddBodies Method (IMassProperty)

Uses only the specified bodies when calculating the mass properties for this model.

.NET Syntax

Visual Basic (Declaration) 
Function IAddBodies( _
   ByVal NumBodies As System.Integer, _
   ByRef BodyListIn As Body2 _
) As System.Boolean
Visual Basic (Usage) 
Dim instance As IMassProperty
Dim NumBodies As System.Integer
Dim BodyListIn As Body2
Dim value As System.Boolean
 
value = instance.IAddBodies(NumBodies, BodyListIn)
C# 
System.bool IAddBodies( 
   System.int NumBodies,
   ref Body2 BodyListIn
)
C++/CLI 
System.bool IAddBodies( 
&   System.int NumBodies,
&   Body2^% BodyListIn
) 

Parameters

NumBodies

Number of bodies in the model

BodyListIn
  • in-process, unmanaged C++: Pointer to an array of bodies in the model of size NumBodies
  • VBA, VB.NET, C#, and C++/CLI: Not supported

    See In-process Methods for details about this type of method.

  • Return Value

    True if the specified bodies are used for calculating mass properties, false if not

    Remarks

    This method lets you select which solid bodies to use when calculating mass properties, much like a end-user selecting the bodies via the interface.

     

    NOTE: If a sheet (surface) body is specified, it is ignored and false is returned.

     

    The results of the mass property calculations vary based on whether or not this method is used.  

     

    If this method is...

    Then...

    Called and bodies are specified

    These bodies can either be from a subset of the documents body list or from temporary bodies.  

    NOTE: Each specified body should either come from the owning document or be a temporary body. If the body does not satisfy either case, then it is not used when calculating the mass properties.

    Not called

    Mass properties' calculations include all available bodies in the document.

    • Part. All of the solid bodies are included in the calculations.  

    • Assembly. All of the bodies in all of the components are used in the calculations.

     

    If the document from which the MassProperty object came is an assembly, then any body from any of the child components can be used. To obtain the body, call IComponent2::GetBodies2. Your application does not need to make a copy of the body or apply a transform to the body.

     

    See Also

    Availability

    SOLIDWORKS 2003 SP2, Revision Number 11.2


    Provide feedback on this topic

    SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

    * Required

     
    *Email:  
    Subject:   Feedback on Help Topics
    Page:   IAddBodies Method (IMassProperty)
    *Comment:  
    *   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

    Print Topic

    Select the scope of content to print:




    x

    We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

     Never show this message again
    x

    Web Help Content Version: API Help (English only) 2015 SP05

    To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

    To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.