Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

API Fixed sub-components

Status
Not open for further replies.

Dynamism

Mechanical
Joined
Apr 1, 2007
Messages
8
Location
US
It appears that IsFixed returns true for any components of fixed subassemblies, even with Flexible Solving... ie though Solidworks allows you to move the sub-part, the API tells you that it's fixed! Anyone seen this and knows whether it's a bug and if there's a workaround?

Thanks,

J
 
API Help said:
Component2::IsFixed

Description
This method determines if the component is fixed or floating.



Syntax (OLE Automation)

retval = Component2.IsFixed ()



Return:
(BOOL) retval
TRUE if this component is fixed, FALSE if it is floating




Syntax (COM)

status = Component2->IsFixed ( &retval )



Output:
(VARIANT_BOOL) retval
TRUE if this component is fixed, FALSE if it is floating

Return:
(HRESULT) status
S_OK if successful




Remarks

This method only applies to the top level of components. To get the actual state of sub-assemblies, you must get the ModelDoc2 object of the subassembly, show the desired configuration, and get the state (fixed or floating) of the lower components.

To determine if a component is fixed or floating, you must begin the traversal from the subassembly document in the appropriate configuration instead of from the root level. At the root level, all of the components in the subassembly are allowed to move.
 
Ahh, thank-you. My help-files are clearly out of date, as those extra remarks are sadly missing.

J
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top