Is there a way to get columns in form? I would like to put
Hole F Type { List the types} Hole F Location {input box}
Hole N Type { List the types} Hole N Location {input box}
Hole G Type { List the types} Hole G Location {input box}
If not this form will be off the monitor. Be ten miles long.
Solved! Go to Solution.
Solved by mrattray. Go to Solution.
I think that's a lot more complicated then what you need! It is indeed written for VBA, but shouldn't be too hard to convert. (The languages and object model are near identical).
Can you post what you have so far?
Welllllll I don't really have anything. What I been doing was looked at that code found anything that said derive and copied the code to see what happens nothing but errors.
I really just started when I asked the question thought you might have snippit. So I am doing research on how to but find very little on the subject.
But I am on this hard today so if and when I get something that starts to work I will post.
Thanks
Do you know where to find the help in the Inventor program files none of my help buttons work here at my lients place and at home. When I write code there is a help button that is for ilogic but it don't work the only help I found under the program was the help for VB and VBA and someone posted where that file was.
I don't knw what happen to Autodesk but they sure are going off the path.
I was just hoping to get a better idea of what you're trying to accomplish by looking at what you currently have. If you don't have even that much, could you then share what sort of workflow you have imagined here?
No, I never have found any help for iLogic. When did they introduce it? 2010 was it? Three versions and still no help?
Anyways, I just refer to the API help and object model. It's close enough 95% of the time. The other 5% of the time I post on this forum.
Well found the ilogic help
What I would like is in my form have an option to create the oppisite hand at the time I generate the one.
I figure I would have a radio group yes or no (see pic). If yes is selected when I generate the left hand the right hand will be generated also.
My client does conveyors for brewing companies and they are not the fastest in modeling so I am making it easy for them. They will not have to model anything just configure the parts and put it togther and that I will do with ilogic in the near future. I have 80% of the parts done this one is the only part that needs to have an oppisite hand.
I know I could show them how to do it but trust me they are not engineers and they really don't know software to well. one guy I have to show him every day how to add a sheet in the IDW and I have been here for 2 1/2 months seems they just really don't care to learn the software.
And I am really just digging in the ilogic. When it 1st came out I was not sure it would stay so I did not dive into it and then a client I had was using Solid Edge so I went away from inventor for 1 1/2 years and now back in it and I see ilogic is still around. I really like it, just wish there was a book. As far as my programing skills I'm rusty have not done that in years too so trying to get back in gear.
Thanks For any help you can give..
Here is a link to the help for ilogic. Its not the best but it has some things...
That help file doesn't really help wih anything but the most basic of tasks. I was hoping for something more inline with what's available in the API.
Have you considered maybe having a copy of your current master part with a mirror feature set to not keep the original in it? You could have this part configure itself out with the same workflow your using with the primary part but the mirror feature would cause it to be a mirror image.
yeah the help is not much help at all.
I did but then it is not a true mirror so if they change one the other will not and I see issuess with that. So the best for this place anyway would be a derive part. Or do you have something else to keep the two the same but oppisite so if one changes the other will also.
LOL found this under the ilogic help but I can't find it.
Sample code for automation interface
A sample VBA macro to access iLogic can be found at the following location:
Program Files\Autodesk\Inventor [version]\Samples\iLogic Samples\API\iLogicAutoTest.ivb
Well this will startr a new part but not a sheet metal part but its a start.
Dim oPartDoc As PartDocument oPartDoc = ThisApplication.Documents.Add(kPartDocumentObject, _ ThisApplication.FileManager.GetTemplateFile(kPartDocumentObject))
For sheet metal template
Dim oPartDoc As PartDocument oPartDoc = ThisApplication.Documents.Add(kPartDocumentObject, _ ThisApplication.FileManager.GetTemplateFile(kPartDocumentObject, , , "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}"))
Hello all,
How can I control the position of the form after it opens. I have a form that is automatically opened when new file is opened, but it opens it in the center of the scrreen. I want it to be pően all the time, but not in the cenet...lets say in a lower righ corner.
Can I set the opening position of the form?
thanks
Hello.
Yes. you are right. I figured it out later.
Thanks.
I have another problem now: I have a part that has a form, that is opened when the part is opened. When i insert the part into an assembly, the form also opens. I don't want that. How can I make the form apear only when the part modeling enviroment is open?
I assume you're opening the form with a rule set in your event triggers. Try using this snippet to check the current environment against the document's base environment. It should work as long as you're only using this form with parts. If you use it with assemblies than it will get confused with sub-assemblies.
Dim currEnviro, baseEnviro As Environment Dim oEnvironmentManager As EnvironmentManager Dim oEditTargetId As String oEnvironmentManager = ThisDoc.Document.EnvironmentManager oEnvironmentManager.GetCurrentEnvironment(currEnviro,oEditTargetId) baseEnviro = ThisDoc.Document.EnvironmentManager.BaseEnvironment() If currEnviro.displayname = baseEnviro.displayname Then 'You're actually in the part End If
Hello,
yes you are right, I am using a rule to trigger the appearend of the form.
So I should insert this snipet in the rule that triggers the form? And insted of "You're actually in the part" i should put the form opening comand: "iLogicForm.Show"?
No change it does the same thing.
This is my rule that opens the form.
Dim currEnviro, baseEnviro As Environment
Dim oEnvironmentManager As EnvironmentManager
Dim oEditTargetId As String
oEnvironmentManager = ThisDoc.Document.EnvironmentManager
oEnvironmentManager.GetCurrentEnvironment(currEnviro,oEditTargetId)
baseEnviro = ThisDoc.Document.EnvironmentManager.BaseEnvironment()
If currEnviro.displayname = baseEnviro.displayname Then
iLogicForm.Show("Stock Type")
End If
Can't find what you're looking for? Ask the community or share your knowledge.