Inventor General Discussion

Inventor General Discussion

Reply
*Expert Elite*
cwhetten
Posts: 1,090
Registered: ‎09-03-2008
Message 21 of 29 (233 Views)

Re: why I rant

08-20-2012 10:04 AM in reply to: jletcher

There are thousands of samples right here in this forum.  People have posted many examples of code for all kinds of purposes.

*Pro
jletcher
Posts: 1,983
Registered: ‎05-18-2011
Message 22 of 29 (223 Views)

Re: why I rant

08-20-2012 10:24 AM in reply to: cwhetten

Yes, you are correct this is how I learned what I know plus a small course I found. But I am moving into the advance of ilogic and those samples and codes are few.

 

 

I have to give Curtis Waguespack the biggest kudos there is. If it was not for him I would be stuck dreaming of the things I wish to do.

 

 

Again Curtis I can not thank you enough for your help. :smileyhappy:


Please mark this response as "Accept as Solution" if it answers your question.

James Letcher
2012 Factory Design Suite ( will not load 2013)
What happen to my Inventor :-(
*Expert Elite*
cwhetten
Posts: 1,090
Registered: ‎09-03-2008
Message 23 of 29 (221 Views)

Re: why I rant

08-20-2012 10:33 AM in reply to: jletcher

As Jonathan mentioned above, iLogic is based on VB.net.  If you really want to dig into the meat of iLogic, (and become as knowledgeable as Curtis), then I think you want to learn VB.  There is a lot more info out there about VB than iLogic.

 

I have been meaning to learn VB myself, but I just haven't gotten around to it yet.  I guess I'm not sure where to start, but since I have had success learning some programming at university, I would probably do well to just shell out some cash and take a course on VB.

*Pro
jletcher
Posts: 1,983
Registered: ‎05-18-2011
Message 24 of 29 (214 Views)

Re: why I rant

08-20-2012 10:48 AM in reply to: cwhetten

Yes and No I can write VB like the back of my hand but I for some reason cannot convert VB to ilogic but I have not given up this weekend I spent hours trying things and learned somethings.. and if you read the beginning of this post my problem is when I go to the API help I get a whole lot of cannot display this is why I can't learn the things I want to.

 

Autodesk is more focus on useless Interfaces and taking the best help I have ever seen and turn into the biggest crappiest help I have ever seen in a software in years.

 

Like I said I no longer promote Inventor.

 

I had one guy remember how I raved about Inventor and he was telling someone about it and said hang on hey Jim come tell Steve about Inventor. I said what Inventor Never herd of it.....................

 

 


Please mark this response as "Accept as Solution" if it answers your question.

James Letcher
2012 Factory Design Suite ( will not load 2013)
What happen to my Inventor :-(
*Expert Elite*
mrattray
Posts: 2,538
Registered: ‎09-13-2011
Message 25 of 29 (206 Views)

Re: why I rant

08-20-2012 11:09 AM in reply to: jletcher

iLogic is a lot closer to VBA then VB. Look at internet help for VBA and use the API's object browser, not VB help.

Mike (not Matt) Rattray

Valued Contributor
JohnK_TEDCF
Posts: 72
Registered: ‎08-16-2010
Message 26 of 29 (202 Views)

Re: why I rant

08-20-2012 11:20 AM in reply to: jletcher

"Your buddy John said it would not work for what I need. I understand I logic but what I can't find are the things that make ilogic go. The code and samples..."

 

 

 

I feel that I need to clarify my answer to you.

 

Our course teaches the user the ins and outs of iLogic.  We show them the process and give them the tools "to make iLogic go".  We DO offer examples and include part files with our course to help the user understand.

 

You're looking for a large library of code to copy and paste from.  That is not what we sell.  This is why I said that our course probably isn't what you're looking for.

John Koop
Software Engineer/ Inventor Specialist
TEDCF Publishing
www.trainingtutorial.com
*Pro
jletcher
Posts: 1,983
Registered: ‎05-18-2011
Message 27 of 29 (199 Views)

Re: why I rant

08-20-2012 11:31 AM in reply to: JohnK_TEDCF

No I understand what you said but then the other guy said it is what i need unless i read his wrong it is monday..

 

I looked into the course, for new ilogic users i would suggest it to them.

 

But as you said not for me :smileysad:


Please mark this response as "Accept as Solution" if it answers your question.

James Letcher
2012 Factory Design Suite ( will not load 2013)
What happen to my Inventor :-(
*Expert Elite*
jdkriek
Posts: 545
Registered: ‎03-29-2007
Message 28 of 29 (191 Views)

Re: why I rant

08-20-2012 11:52 AM in reply to: jletcher

99% of the time I use the VBA without much modification in iLogic - aside from assigning a reference to an object and a few shortcuts that iLogic has provided, they will function the same. Some of my scripts might be a tad shorter if I use the iLogic shortcut version of something, but there's certainly no diffrence when it gets executed. I've done VERY advanced scripts from VBA to iLogic and it took a grand total of 2 minutes to convert it.

Let me give you an example:

VBA:

 

Public Sub RemoveFeature()
	Dim oDoc As Document
    Set oDoc = ThisApplication.ActiveDocument
	Dim oFeature As PartFeature
	Dim oFeatures As PartFeatures
    Set oFeatures = oDoc.ComponentDefinition.Features
        For Each oFeature In oFeatures
            If oFeature.Name = "NameOfYourFeature" Then
                oFeature.Delete
            End If
        Next
End Sub

But I can run almost the exact same code in iLogic.

Notice I'm not using Set and in many cases you don't even need to Dim anything.

It's still assigning a reference to an object.

iLogic:

 

oDoc = ThisApplication.ActiveDocument
oFeatures = oDoc.ComponentDefinition.Features
	For Each oFeature In oFeatures
		If oFeature.Name = "NameOfYourFeature" Then
			oFeature.Delete
        End If
    Next

Revised iLogic:

 

Now, that will work just fine, but if we dig a little deeper we'll find that we can simplify the code in iLogic thanks to it's VB.NET additions Try/Catch along with other shortcuts as mentioned before.

 

oDoc = ThisDoc.Document
oFeatures = oDoc.ComponentDefinition.Features
Try 
oFeatures("NameOfYourFeature").Delete 
Catch 
MsgBox("No feature exists with that name")
End Try

Does that help?

Jonathan D. Kriek

Autodesk Inventor Certified Expert
Microsoft Certified Application Developer
_____________________________________________________
Did I help you? Please choose Accept as Solution or Kudos below
*Pro
jletcher
Posts: 1,983
Registered: ‎05-18-2011
Message 29 of 29 (123 Views)

Re: why I rant

10-04-2012 09:54 AM in reply to: jdkriek

Lets add to this. Here is a bug and this is what I wish Autodesk would fix not add more features with bugs but fix the ones they have than move forward....

Formed.JPG

poof.JPG

Formed2.JPG

poof2.JPG

 

Win some lose some :smileyhappy:

 

No reply needed no I will not post offending part I know it will work in 2013 lol.

 

Slow down on the upgrades fix issues than come out with a banging 2014 make me proud to say I use Inventor....

 

:smileyhappy:


Please mark this response as "Accept as Solution" if it answers your question.

James Letcher
2012 Factory Design Suite ( will not load 2013)
What happen to my Inventor :-(
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.