Inventor Customization

Inventor Customization

Posts: 15
Registered: ‎07-31-2007
Message 1 of 4 (645 Views)

Ilogic iproperties

645 Views, 3 Replies
11-07-2011 02:25 PM
Im trying to create a list of text strings to select from defining material thickness and then plug that selection into a global form custom iproperty called "MaterialDescription".. Any ideas? Also, is it possible to access and pre-enter field text edit items in iLogic?
Posts: 15
Registered: ‎07-31-2007
Message 2 of 4 (603 Views)

Re: Ilogic iproperties

11-16-2011 05:26 AM in reply to: mstalter

more to come...

Posts: 15
Registered: ‎07-31-2007
Message 3 of 4 (602 Views)

Re: Ilogic iproperties

11-16-2011 05:45 AM in reply to: mstalter

To add further info to my original post, what I would like to accomplish in this iLogic code is to ask the user a question such as "What is the part thickness?" and have a list of text strings such as 6mm, 10mm, 12mm,15mm,etc appear from the user to select from. I would then like to assign 2 different text variables based on their response sort of like;


If answer (whatever this code for "answer" needs to be, not sure myself) = "6mm" then

iProperties.value"("Custom", "RawMaterialDescription") = "Plate, Steel 6mm"

<next I want to create a new iProperty or Property (not sure of the differences) that would be something like this>

RawMaterial = "100099612" <to be used later but at run time this would not exist an a custom iproperty and would need to create it>

else if

answer = "10mm" then

iProperties.value"("Custom", "RawMaterialDescription") = "Plate, Steel 10mm"

RawMaterial = "100099613"

else if

answer = "12mm" then

iProperties.value"("Custom", "RawMaterialDescription") = "Plate, Steel 12mm"

RawMaterial = "100099615"

else if

answer = "15mm" then

iProperties.value"("Custom", "RawMaterialDescription") = "Plate, Steel 15mm"

RawMaterial = "100099616"

end if


This code would be tied into a global rule I've created that automatically assigns text values to a few of out custom iproperties we've created in parts, drawings, and assemblies but of all the custom iproperties we've created, only a handful have to be filled out for the drawing to be correct. I'm trying to speed up this process by auto-filling just the ones necessary for the drawing title block to be correct as that's where these custom iProperties end values in the title block. The code I'd like the above to integrate with is a global rule that opens a global form that I run while in the drawing or part and looks like this:


Global Rule


MessageBox.Show(ds, "Date", MessageBoxButtons.OK)
iProperties.Value("Custom", "RawMaterialCode")="1PL080"
iProperties.Value("Project", "Revision Number")="01"
iProperties.Value("Custom", "PlateIndicator")="Y"
iProperties.Value("Custom", "ChangeNumber")="1228021"
iProperties.Value("Summary", "Author")="M.STALTER"
iProperties.Value("Project", "Designer")="M.STALTER"
End Sub


The Global form looks like the attachment;


 I run the rule, fill out whats not already pre-populated, & save the part. I proceed to create the drawing and add the views. Then I run the global rule again and fill out the unpopulated ones for the drawing, save, and proceed to adding annotation to the drawing. in the above description, the "RawMaterialDescription" has to be typed out each time and actually populates the "Material" block in the title block. Addidionally, depending on the thickness (and density) a raw material number like "100099612" is assigned to the material which is later used in runniing a VBA program we've created internally which creates a 2d burn profile of the part. In that program, we have a list of raw materials to select from that once ran, sends athe profile and raw material number thickness to the process planners creating the routers that then go to the guy cutting the steel. I'm trying to simplify entering the drawing iprops necessary. Does anyone out there know what code I'd need to create the list of materials to select from as well as actually create a custom iproperty for the raw material? I'm new to iLogic programming and can really use the help. I hope this works out and shows the current code and jpg ogf the global form as I just inserted them into this post and did not add them as attachments. If it messes up, I'll resend with attachments. Thanks in advance for your consideration.


Mike Stalter


Posts: 959
Registered: ‎02-24-2009
Message 4 of 4 (591 Views)

Re: Ilogic iproperties

11-16-2011 03:48 PM in reply to: mstalter


 Sorry, there's no way to specify a list of possible values for an iProperty in an iLogic form.  You could do it with a custom form developed in VB.NET, compiled into a DLL, and launched from an iLogic rule. 
But everything you're talking about could also be done with VBA.  Since you're already using that for one part of the process (the burn profile), it might be the best way to go for the form as well.

Mike Deck
Software Developer
DLS - Mechanical Design
Autodesk, Inc.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
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.