Submitted by Learner on Tue, 07/15/2014 - 20:10
Forums:
Hi there .. can anybody help me in solving this error ..
Value of type 'NXOpen.Assemblies.Component cannot be converted to 'NXOpen.Body'
here is the line in which i am getting that error
dim body5 as body=CType(component1,body).
thanks
re: component to body
A component cannot be directly converted to a body object. The component may contain multiple bodies or none at all; you will need to access the bodies of interest from the component. One way to do this would be to access the part file that the component comes from and getting the .Body collection. Or perhaps it would be better to collect the solid bodies from the current reference set of the component...
component to body
can u please post the code. as i am new to this topic of journaling i am not sure how to make that thanks.