Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Creating new Slabs

2 REPLIES 2
Reply
Message 1 of 3
thiago.loddi
763 Views, 2 Replies

Creating new Slabs

Hi

 

Im trying to create new slabs in my project using 

 

Dim slab as Autodesk.Revit.DB.Floor

 

slab = doc.Create.NewSlab(profile as CurveArray, level as Level, slopeline as Line, slope as Double, structural as Boolean)

 

I managed to successfuly create the slab, but it appears to be like, hollow, only draw its borders, weird.

Anyway, it creates a slab from a certain Type, that must be the Default.

When I load this macro in another PC, another Type of slab is created, and the hollow problem desappears.

Does anyone know how can I change this default Type, or set a new one in the API?

Any tips on the hollow slab would be good as well

 

thanks

Thiago

2 REPLIES 2
Message 2 of 3
santiagodiaz
in reply to: thiago.loddi

I don't know about NewSlab.

But if you went with NewFloor (Revit 2013), 2 of its overloads allow you to specify the FloorType:

 

NewFloor(CurveArray, FloorType, Level, Boolean)

Creates a floor within the project with the given horizontal profile and floor style on the specified level.

 

NewFloor(CurveArray, FloorType, Level, Boolean, XYZ)

Creates a floor within the project with the given horizontal profile and floor style on the specified level with the specified normal vector.

 

I've used the first of these and it works as intended.

The Boolean argument is to specify whether the floor is structural or not.

Message 3 of 3
Ning_Zhou
in reply to: thiago.loddi

try to use proper floortype, sometimes UI's default type is not same as API's default type, it happened once to me (don't remember if it's a roof or a curtain wall?).

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community