Tuesday, March 11, 2014

iLogic - Delete Custom iProperties

Issue:
You have some custom iProperties in your file that you want to remove. Because you have a lot of files that contain these custom iProperties, you find yourself doing this quite often. You'd like an iLogic rule that will help with this when you encounter these custom iProperties.


Solution:
Here are three rule variations to help with this.

Variation 1
Delete only the custom iProperties found in the list.



'------- start of ilogic ------

'define list of custom properties to delete
Dim MyArrayList As New ArrayList
MyArrayList.add("Hello World 001")
MyArrayList.add("Hello World 002")
MyArrayList.add("Hello World 003")

'define custom property collection
oCustomPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties")
'look at each property in the collection
For Each oCustProp in oCustomPropertySet
'check property name against the list you want to delete
If MyArrayList.Contains(oCustProp.name)Then
'delete the custom iProperty
oCustProp.Delete
Else
'skip it
End If
Next

'------- end of ilogic ------


Variation 2
Delete only the custom iProperties NOT found in the list.


'------- start of ilogic ------

'define list of custom properties to keep
Dim MyArrayList As New ArrayList
MyArrayList.add("Hello World 001")
MyArrayList.add("Hello World 002")
MyArrayList.add("Hello World 003")

'define custom property collection
oCustomPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties")
'look at each property in the collection
For Each oCustProp in oCustomPropertySet
'check property name against the list you don't want to delete
If MyArrayList.Contains(oCustProp.name)Then
'skip it
Else
'delete the custom iProperty
oCustProp.Delete
End If
Next

'------- end of ilogic ------


Variation 3
Delete All custom iProperties found in the part.


'------- start of ilogic ------

'define custom property collection
oCustomPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties")
'look at each property in the collection
For Each oCustProp in oCustomPropertySet
'delete the custom iProperty
oCustProp.Delete
Next

'------- end of ilogic ------

Sunday, March 2, 2014

Infinite Skills – Autodesk Inventor 2014 Tutorial Series

Are you looking for a video tutorial series for Autodesk Inventor?
 
Infinite Skills has recently released its Learning Autodesk Inventor 2014 series featuring instructor Adam Cooper.  I was provided the DVD and asked to review this tutorial series, and was very pleased with the content found within.
When I popped in the DVD, the autoplay opened the viewing application and presented me with the Chapter menu as shown here:
Click to Enlarge
 
Once I clicked on Chapter 1, I was presented with a list of topics as shown here:


Click to Enlarge
 

A status legend on the right shows which videos I've watched with a shaded dot, as well as a partially shaded dot for those videos that I only watched part of. As you can image this can be a great help when jumping around within the chapters.

Once a topic is selected the video plays in the application. The author's pace is quite good, but since it is a video you can always use the buttons found in the video control tool bar to pause and rewind as needed.



Click to Enlarge
 Also included on the DVD are all of the working files needed for the exercises. The files can be accessed easily via the video interface.




Click to Enlarge

This DVD contains some outstanding material from a very knowledgeable instructor. You'll have the feeling you're in the classroom being led through the course material with Adam Cooper right there helping you along the way!

For more information, have a look at the Infinite Skills website:
 http://www.infiniteskills.com/training/learning-autodesk-inventor-2014.html

Monday, October 21, 2013

iLogic: How to learn Inventor's Application Programming Interface (API)

Issue:
You've been somewhat successful using iLogic code examples that you find online, but you'd really like to learn how to create your own code from scratch. So how do these other people find the programming calls to create new code? It seems that there is some missing puzzle piece that you can't seem to locate, something that explains how to get started programming in Inventor. Does something like that exist?  




Solution:
Programming in iLogic involves two different methods, that are often mixed together. The first method is to use "native" iLogic functions, the second is to use "raw" API functions by employing Inventor's Application Programming Interface (API).

  • "Native" iLogic functions are a dictionary of automation functions that deliver the power of Inventor's Application Programming Interface (API) to users by using single-line automation functions. So you can think of iLogic as a collection of the more common programming and automation tasks that the developers have "cleaned" up so that users can create some Rule based automation in their design. This mean that the iLogic dictionary is just a simple subset of the larger API collection. 

  • "Raw" API language can be run using the iLogic tools as well, but will require more knowledge of VB.Net based syntax, and more need to declare and define within the code language. To get started with Inventor's Application Programming Interface (API) you can use the following links. 

**********    **********     **********    **********     **********    **********     **********    **********     **********
This paper provides a brief overview of Inventor’s programming interface and illustrates this with examples using iProperties:
VBA & Inventor API Introduction (zip file - 11.2 MB)

**********    **********     **********    **********     **********    **********     **********    **********     **********



**********    **********     **********    **********     **********    **********     **********    **********     **********
The following resource will help you get started with programming Inventor. It assumes familiarity with Autodesk Inventor and general programming concepts:

DevTV: Introduction to Inventor Programming, a self-paced video tutorial demonstrating how to get started developing with Autodesk Inventor.
View online | Download (zip file- 51.8 MB)
**********    **********     **********    **********     **********    **********     **********    **********     **********



**********    **********     **********    **********     **********    **********     **********    **********     **********
The links above as well as additional information concerning the Autodesk Developer Network resources, can be found at this link:

http://usa.autodesk.com/adsk/servlet/index?id=1079044&siteID=123112

**********    **********     **********    **********     **********    **********     **********    **********     **********