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: 

Create ArchitecturalWall

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
Anonymous
546 Views, 6 Replies

Create ArchitecturalWall

Anonymous
Not applicable

Hi,

Can someone help me with an examplecode for creating a new Wall:Architectural?

 

I wish to insert a radius/allow the wall to follow a curve.

Now my curves are within the CurveArray category and created as follows;

 

CurveArray curve1= new CurveArray();
Arc path = CreateArcByGivingPlane(plane, r, angle1, angle2);
curve1.Append(path);

 

Thank you.

0 Likes

Create ArchitecturalWall

Hi,

Can someone help me with an examplecode for creating a new Wall:Architectural?

 

I wish to insert a radius/allow the wall to follow a curve.

Now my curves are within the CurveArray category and created as follows;

 

CurveArray curve1= new CurveArray();
Arc path = CreateArcByGivingPlane(plane, r, angle1, angle2);
curve1.Append(path);

 

Thank you.

6 REPLIES 6
Message 2 of 7
Moustafa_K
in reply to: Anonymous

Moustafa_K
Collaborator
Collaborator
Accepted solution

try reading this and let us know if you successfully able to create a wall from cuve

https://forums.autodesk.com/t5/revit-api-forum/intro-to-revit-api-create-wall-from-location-line-or-...

Moustafa Khalil
Cropped-Sharp-Bim-500x125-Autodesk-1
0 Likes

try reading this and let us know if you successfully able to create a wall from cuve

https://forums.autodesk.com/t5/revit-api-forum/intro-to-revit-api-create-wall-from-location-line-or-...

Moustafa Khalil
Cropped-Sharp-Bim-500x125-Autodesk-1
Message 3 of 7
naveen.kumar.t
in reply to: Anonymous

naveen.kumar.t
Autodesk Support
Autodesk Support
Accepted solution

Hi @Anonymous ,

Here is an example code

 XYZ origin = new XYZ(0, 0, 0);
                XYZ normal = new XYZ(0, 0,10);
                Plane p = Plane.CreateByNormalAndOrigin(normal,origin);
                SketchPlane sp = SketchPlane.Create(doc, p);

                IList<Curve> curvess = new List<Curve>();
                Arc path = Arc.Create(p, 35, Math.PI / 2, Math.PI);
                curvess.Add(path);

                Level level1;
                Wall.Create(doc, path, level1.Id, false);

I hope this helps.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes

Hi @Anonymous ,

Here is an example code

 XYZ origin = new XYZ(0, 0, 0);
                XYZ normal = new XYZ(0, 0,10);
                Plane p = Plane.CreateByNormalAndOrigin(normal,origin);
                SketchPlane sp = SketchPlane.Create(doc, p);

                IList<Curve> curvess = new List<Curve>();
                Arc path = Arc.Create(p, 35, Math.PI / 2, Math.PI);
                curvess.Add(path);

                Level level1;
                Wall.Create(doc, path, level1.Id, false);

I hope this helps.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Message 4 of 7
Anonymous
in reply to: naveen.kumar.t

Anonymous
Not applicable

Hi,

I have tried this earlier, but I guess I defined something wrong, cause now it worked. 

Thank you!

 

How do I set the height of the wall?

0 Likes

Hi,

I have tried this earlier, but I guess I defined something wrong, cause now it worked. 

Thank you!

 

How do I set the height of the wall?

Message 5 of 7
Moustafa_K
in reply to: Anonymous

Moustafa_K
Collaborator
Collaborator
0 Likes

Message 6 of 7
naveen.kumar.t
in reply to: Anonymous

naveen.kumar.t
Autodesk Support
Autodesk Support
Accepted solution

Hi @Anonymous ,

To set the height of the wall

Wall w;
int heightofWall; if(w!=null) { Parameter P1 = w.get_Parameter(BuiltInParameter.WALL_USER_HEIGHT_PARAM); if(P1!=null) { P1.Set(heightofWall); } }

Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes

Hi @Anonymous ,

To set the height of the wall

Wall w;
int heightofWall; if(w!=null) { Parameter P1 = w.get_Parameter(BuiltInParameter.WALL_USER_HEIGHT_PARAM); if(P1!=null) { P1.Set(heightofWall); } }

Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Message 7 of 7
Anonymous
in reply to: naveen.kumar.t

Anonymous
Not applicable

Thank you, that worked perfectly 😄

0 Likes

Thank you, that worked perfectly 😄

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

Post to forums  

Autodesk Design & Make Report