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: 

Ilogic iproperties

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
952 Views, 3 Replies

Ilogic iproperties

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?
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

more to come...

Message 3 of 4
Anonymous
in reply to: Anonymous

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 up....as 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

 

SubMain
ds=DateString
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"
iLogicForm.ShowGlobal("iprops")
iLogicVb.UpdateWhenDone=True
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

 

Message 4 of 4
MjDeck
in reply to: Anonymous

Mike,

 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
Autodesk, Inc.

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

Post to forums  

Autodesk Design & Make Report