Here are pointers to some relevant non-API news items of interest:
We already held a webinar on the new Autodesk View and Data API in September.
Here are the old description and full details of that, and, for the first time, we proudly present the detailed notes of the September presentations by Stephen Preston and Cyrille Fauvel.
In case you missed it, another chance is coming up again soon: the next free webinar Introducing the new Autodesk View and Data API will be held on Thursday October 23rd, 2014.
Autodesk now provides free software for students, teachers, and schools around the world.
Inspiring creativity and a love for science, engineering, and math in young students is more important today than ever. So I'm very happy to announce that Autodesk has opened up FREE access to its desktop software to ALL students, teachers, and schools everywhere in the world.
In the past, access was free in some countries, but not others. Today there are no restrictions. However, all too often students and teachers are unaware that they can have their own copy and use our software in their classroom for free. The simplest way to help a student or teacher is to direct them to students.autodesk.com where they can download as much as they want and find curriculum and learning materials.
I mentioned the Revit API expert panel SD5156 – Open House on the Factory Floor taking place at Autodesk University.
A few of my fellow ADN colleagues' class enrolments are currently below the attendee threshold, however:
If these classes are of interest to you, please register for them to ensure they really take place.
You can check the AU 2014 class catalogue for the complete list of classes.
By Jeremy Tammik.
Question: How can I add TrimPlanes to structural members using ACA .NET API?
I tried the code provided in 2012 with little success.
When I try to write to the TrimPlanes property, e.g. like this, it returns a 'ReadOnly'" error:
member.TrimPlanes = trimPlanes
Any ideas how to fix this?
Answer: Basically, the following sample code skeleton should work:
trimPlanes= owner.TrimPlanes; plane1 = new TrimPlane(); ... trimPlanes.Add(plane1);
Here is a complete command implementation sample:
<CommandMethod("testmemberTrim")> _Public Sub testmemberTrim()Dim db As Database = HostApplicationServices.WorkingDatabaseDim tm As Autodesk.AutoCAD.DatabaseServices.TransactionManager = db.TransactionManagerDim trans As Transaction = tm.StartTransaction()Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.EditorTryDim member As Member = New Member()member.MemberType = MemberType.Columnmember.SetDatabaseDefaults(db)member.SetToStandard(db)' Set the start and end point of Member in WCSmember.Set(New Point3d(0.0, 0.0, 0.0), New Point3d(5000.0, 0.0, 0.0))' create a trim plane at the startDim ptOrigin As Point3d = New Point3d(1.0, 1.0, 1.0)Dim vec As Vector3d = New Vector3d(1, 0, 0)Dim tp1 As TrimPlane = New TrimPlane()tp1.SubSetDatabaseDefaults(db)tp1.SetToStandard(db)tp1.End = TrimPlaneFrom.Starttp1.Plane = New Plane(ptOrigin, vec.GetNormal())member.TrimPlanes.Add(tp1)' create another trim plane at the endDim tp2 As TrimPlane = New TrimPlane()tp2.SubSetDatabaseDefaults(db)tp2.SetToStandard(db)tp2.End = TrimPlaneFrom.Endtp2.Plane = New Plane(ptOrigin, vec.GetNormal())member.TrimPlanes.Add(tp2)Dim blkTbl As BlockTable = trans.GetObject(db.BlockTableId, OpenMode.ForRead)Dim ms As BlockTableRecord = trans.GetObject(blkTbl(BlockTableRecord.ModelSpace), OpenMode.ForWrite)ms.AppendEntity(member)trans.AddNewlyCreatedDBObject(member, True)trans.Commit()CatchMsgBox("\nMember creation failed")trans.Abort()FinallyMsgBox("\nMember created!")trans.Dispose()End TryEnd Sub