Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use AddForSolid method

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
339 Views, 2 Replies

How to use AddForSolid method

Hi All I want to know how to use new AddForSolid method . AddForSolid( Combine As Boolean = True, Curves As Variant, <--- ??? (This is my ???) reserved As Variant) As Profile I want to create Extend feature like Capture01.jpg using API. Please give me some information or sample . AKIRA
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

Akira, The Curves argument will not help much in this case. For you example, the AddForSolid method generates a Profile consisting of 3 ProfilePaths. Each ProfilePath consists of a SketchCircle. You would use the Curves argument if you would like the returned Profile to have just ONE ProfilePath consisting of ALL the sketch entities that you care about. There isn't such a ProfilePath in this case. So, what you will need to do is alter the returned Profile. I have attached some VBA sample to do that (this is hard coded for your example). Sanjay- Sub Profiles() Dim odoc As PartDocument Set odoc = ThisApplication.ActiveDocument Dim oDef As PartComponentDefinition Set oDef = odoc.ComponentDefinition Dim oProfile As Profile Set oProfile = oDef.Sketches(1).Profiles.AddForSolid oProfile.Item(2).AddsMaterial = True oProfile.Item(3).AddsMaterial = False oProfile.Item(1).Delete Dim oExt As ExtrudeFeature Set oExt = oDef.Features.ExtrudeFeatures.AddByDistanceExtent(oProfile, 1, kPositiveExtentDirection, kJoinOperation) End Sub "AKIRA" wrote in message news:41662cb1_1@newsprd01... > Hi All > > I want to know how to use new AddForSolid method . > > AddForSolid( > Combine As Boolean = True, > Curves As Variant, <--- ??? (This is my ???) > reserved As Variant) As Profile > > I want to create Extend feature like Capture01.jpg using API. > > Please give me some information or sample . > > AKIRA
Message 3 of 3
Anonymous
in reply to: Anonymous

Thank you for your information and sample. I could solve my problem. I assumed that AddsMaterial Property is read-only. Because, API Help said so. AKIRA "Sanjay Ramaswamy (Autodesk)" wrote in message news:4166dd9a$1_1@newsprd01... > Akira, > > The Curves argument will not help much in this case. For you example, the > AddForSolid method generates a Profile consisting of 3 ProfilePaths. Each > ProfilePath consists of a SketchCircle. You would use the Curves argument if > you would like the returned Profile to have just ONE ProfilePath consisting > of ALL the sketch entities that you care about. There isn't such a > ProfilePath in this case. So, what you will need to do is alter the returned > Profile. I have attached some VBA sample to do that (this is hard coded for > your example). > > Sanjay- > > Sub Profiles() > > Dim odoc As PartDocument > Set odoc = ThisApplication.ActiveDocument > > Dim oDef As PartComponentDefinition > Set oDef = odoc.ComponentDefinition > > Dim oProfile As Profile > Set oProfile = oDef.Sketches(1).Profiles.AddForSolid > > oProfile.Item(2).AddsMaterial = True > oProfile.Item(3).AddsMaterial = False > oProfile.Item(1).Delete > > Dim oExt As ExtrudeFeature > Set oExt = oDef.Features.ExtrudeFeatures.AddByDistanceExtent(oProfile, > 1, kPositiveExtentDirection, kJoinOperation) > > > End Sub > > > "AKIRA" wrote in message news:41662cb1_1@newsprd01... > > Hi All > > > > I want to know how to use new AddForSolid method . > > > > AddForSolid( > > Combine As Boolean = True, > > Curves As Variant, <--- ??? (This is my ???) > > reserved As Variant) As Profile > > > > I want to create Extend feature like Capture01.jpg using API. > > > > Please give me some information or sample . > > > > AKIRA > >

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

Post to forums  

Autodesk Design & Make Report