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>
answer = "10mm" then
iProperties.value"("Custom", "RawMaterialDescription") = "Plate, Steel 10mm"
RawMaterial = "100099613"
answer = "12mm" then
iProperties.value"("Custom", "RawMaterialDescription") = "Plate, Steel 12mm"
RawMaterial = "100099615"
answer = "15mm" then
iProperties.value"("Custom", "RawMaterialDescription") = "Plate, Steel 15mm"
RawMaterial = "100099616"
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:
MessageBox.Show(ds, "Date", MessageBoxButtons.OK)
iProperties.Value("Project", "Revision Number")="01"
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.
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.
Access a broad range of knowledge to help get the most out of your products and services.