Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

bodies not recognized as surfacebody

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
Michele_DeLucaSW7PJ
140 Views, 7 Replies

bodies not recognized as surfacebody

Hi everyone

i'm trying to do some work on these bodies in this attached part but ilogic does not see them

..

ComponentDefinition.SurfaceBodies.Count 

has 0 as result ..how is it possible?

7 REPLIES 7
Message 2 of 8

That's interesting, and very odd.  It is showing two bodies in the model browser tree, under the Solid Bodies folder, but is oddly not showing any 'proper'/native features below the Origin folder.  Just a couple icons that look like the body icons, with names like "None" & "None_1", for some reason.  And I too get zero bodies from the following code within that part:

Dim oPDoc As PartDocument = ThisDoc.Document
MsgBox("Bodies Count = " & oPDoc.ComponentDefinition.SurfaceBodies.Count.ToString,,"")

How was this part created?  Is it imported from some other file type?  Did it get some other part(s) derived into it, but the 'Link' was broken to its/their source?  Please explain.  

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 3 of 8

Hi yes i think some kind of weird import.. 

i notice that is recognized as feature..

ComponentDefinition.Features.Count

 the result of this is 2

 

the problem is that i need to get the maximum length dimension thru OrientedMinimumRangeBox but this works only for solid bodies..

Message 4 of 8

You can use the same Function from the ComponentDefinition object.

Dim oPDoc As PartDocument = ThisDoc.Document
Dim oOBox As OrientedBox = oPDoc.ComponentDefinition.OrientedMinimumRangeBox

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 5 of 8

yes that will work

thank you!

Message 6 of 8

the basic reason is the component need to repair the surfacebody or surface. I guess
an error occurred during the  translating. 

Message 7 of 8

yes in fact I imported again and they are recognized as bodies..
Message 8 of 8

Congratulation,It is solved!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report