- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Dear, Please refer the attached inventor sketch which is a warehouse, and inside dots are columns. I am copying the sketch from AutoCAD and pasting it in inventor. Now, I want to create the warehouse after that I need columns as per the attached final image. Below is the ilogic code for creating a warehouse. I want to create the columns, Please help me with the balance code to create columns. (if column creation is not possible, we can insert the columns in the points also ok)
'Creating warehouse without columns
Sub main Dim oPartDoc As PartDocument oPartDoc = ThisApplication.ActiveDocument ' Set a reference to the component definition. Dim oCompDef As PartComponentDefinition oCompDef = oPartDoc.ComponentDefinition 'Dim oSketches As PlanarSketches = ThisApplication.ActiveEditDocument.ComponentDefinition.Sketches 'oSketches("Sketch1").Edit Dim oSketches As PlanarSketches = oCompDef.Sketches 'oSketches("WHBaseSketch").ExitEdit Try oSketches("WHBaseSketch").ExitEdit Catch End Try Dim oSketch1 As PlanarSketch oSketch1 = oSketches("WHBaseSketch") ' Create a profile. Dim oProfile As Profile oProfile = oSketch1.Profiles.AddForSolid ' Create a base extrusion 1cm thick. Dim oExtrudeDef As ExtrudeDefinition oExtrudeDef = oCompDef.Features.ExtrudeFeatures.CreateExtrudeDefinition(oProfile, kJoinOperation) Call oExtrudeDef.SetDistanceExtent(1, kNegativeExtentDirection) Dim oExtrude As ExtrudeFeature oExtrude = oCompDef.Features.ExtrudeFeatures.Add(oExtrudeDef) Dim oFrontFace As Face oFrontFace = oExtrude.StartFaces.Item(1) Dim oSketch2 As PlanarSketch If False Then oSketch2 = oCompDef.Sketches.Add(oFrontFace) Dim featEdge As Edge For Each featEdge In oFrontFace.Edges Call oSketch2.AddByProjectingEntity(featEdge) Next Else 'Simpler version oSketch2 = oCompDef.Sketches.Add(oFrontFace, True) End If Dim entitiesForOffset As ObjectCollection = ThisApplication.TransientObjects.CreateObjectCollection() entitiesForOffset.Add(oSketch2.SketchLines(1)) Dim offsetDistance As Double '= 12 '* 2.54 offsetDistance = 12 * 2.54 Dim offsetDirection As Boolean = True Dim offsetedEntities = oSketch2.OffsetSketchEntitiesUsingDistance(entitiesForOffset, offsetDistance, offsetDirection, True, True) Dim profile2 = oSketch2.Profiles.AddForSolid(True) Dim oExtrudeDef2 = oCompDef.Features.ExtrudeFeatures.CreateExtrudeDefinition(profile2, PartFeatureOperationEnum.kJoinOperation) Call oExtrudeDef2.SetDistanceExtent(60*2.54, kPositiveExtentDirection) Dim oExtrude2 = oCompDef.Features.ExtrudeFeatures.Add(oExtrudeDef2) ThisApplication.CommandManager.ControlDefinitions("AppIsometricViewCmd").Execute End Sub
'I need to insert / craete columns on the points
Thanks
Murugan
Solved! Go to Solution.