Ilogic - Solid bodies to separate RFAs (using solid body name , with iproperties

Ilogic - Solid bodies to separate RFAs (using solid body name , with iproperties

Anonymous
Not applicable
751 Views
1 Reply
Message 1 of 2

Ilogic - Solid bodies to separate RFAs (using solid body name , with iproperties

Anonymous
Not applicable

I'd like to automate these following steps.

1. Hide all solidbodies.

2. Unhide first solid body.

3. Go to "Environment" tab, select "BIM Content", then "Author Building Component"

4. On the dialog box, Set "Orientation" to desired UCS. Then check "Model Properties". 

5. Export Building Component, save as .rfa file using its solid body name.

6. Hide the first solid body.

7. Unhide the next solid body...repeat step 3-6

 

Please see attached  video and part file. Thank you.

0 Likes
752 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Some of the codes I needed is  here. 

I'm working on the first step which is to hide all solid bodies but can't make it work. 

Got an error message "The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))".

Please see the code below.

 

'define the document as a component definition
Dim oCompDef As ComponentDefinition
oCompDef = ThisDoc.Document.ComponentDefinition

'define the solidbody
Dim oBody As SurfaceBody

For Each SurfaceBody In oCompDef.SurfaceBodies
            oBody = oCompDef.SurfaceBodies.Item(i)
          oBody.Visible = False
            i = i +1
          Next

 

0 Likes