Inventor General Discussion

Inventor General Discussion

Reply
Distinguished Contributor
Breeze104
Posts: 218
Registered: ‎01-17-2008
Message 31 of 32 (107 Views)

Re: iLogic & the API

10-29-2012 12:11 PM in reply to: Breeze104

Well, after alot of help from the Techs @ Autodesk I finally got the material description part of things ironed out...

 

When I was trying to use excel to manipulate the out out I kept getting capitalized letters and the numbers and spaces with no hyphen inbetween (ie. 7 1/2 X 3 1/2) which is very close to what I needed but not quite.....So with the gurus @ Autodesk giving me a hand they came up with this all iLogic code that gave me the prorper out put...

 

 

Dim partDoc As PartDocument = ThisDoc.Document
partDoc.ComponentDefinition.SetEndOfPartToTopOrBottom(True)

iProperties.Material = "Steel, Mild"
iProperties.PartColor = "Steel"
 
On Error Resume Next
iProperties.Value("Project", "Description") = SheetMetal.GetActiveStyle() & " x " _
& RoundToFraction(SheetMetal.FlatExtentsWidth, 1/64, RoundingMethod.Round).Replace(" ", "-") & " x " _
& RoundToFraction(SheetMetal.FlatExtentsLength, 1/64, RoundingMethod.Round).Replace(" ", "-")
 
partDoc.ComponentDefinition.SetEndOfPartToTopOrBottom(False)
iLogicVb.UpdateWhenDone = True

 

 

Thanks a bunch SWORDMASTER & the TECHS @ Autodesk

 

I hope this helps someone else as well.....

Distinguished Contributor
Breeze104
Posts: 218
Registered: ‎01-17-2008
Message 32 of 32 (100 Views)

Re: iLogic & the API

10-29-2012 01:27 PM in reply to: Breeze104

I figured out that I could do the title info by adding the "Title" from the "properties tab" summary and entering the info in the created column.  I wish I had tought of this sooner.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.