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 form 2012

38 REPLIES 38
SOLVED
Reply
Message 1 of 39
jletcher
1853 Views, 38 Replies

ilogic form 2012

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}

Can Or Not.JPG

 

If not this form will be off the monitor. Be ten miles long.

38 REPLIES 38
Message 21 of 39
mrattray
in reply to: jletcher

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?

Mike (not Matt) Rattray

Message 22 of 39
jletcher
in reply to: mrattray

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

Message 23 of 39
jletcher
in reply to: mrattray

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.

 

 

Message 24 of 39
mrattray
in reply to: jletcher

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?

Mike (not Matt) Rattray

Message 25 of 39
mrattray
in reply to: mrattray

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.

Mike (not Matt) Rattray

Message 26 of 39
jletcher
in reply to: mrattray

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

 

Side Conf.JPG

 

 

Message 27 of 39
jletcher
in reply to: mrattray

Here is a link to the help for ilogic. Its not the best but it has some things...

 

file:///C:/Program%20Files/Autodesk/Inventor%202012/Help_Lite/index.html?url=files/topichead_d3e2940...

Message 28 of 39
mrattray
in reply to: jletcher

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.

Mike (not Matt) Rattray

Message 29 of 39
jletcher
in reply to: mrattray

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.

Message 30 of 39
jletcher
in reply to: mrattray

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:

  • Windows XP

    Program Files\Autodesk\Inventor [version]\Samples\iLogic Samples\API\iLogicAutoTest.ivb

Message 31 of 39
jletcher
in reply to: jletcher

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))

 

Message 32 of 39
jletcher
in reply to: jletcher

For sheet metal template

Dim oPartDoc As PartDocument

oPartDoc = ThisApplication.Documents.Add(kPartDocumentObject, _
			ThisApplication.FileManager.GetTemplateFile(kPartDocumentObject, , , "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}"))

 

Message 33 of 39
SoulAsasin
in reply to: jletcher

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

Inventor 2012
Win 7 64-bit
Dell Precision T5400
Intel Xeon 2,5 GHz
8 Gb RAM
NVIDIA Quadro Fx 3700
Message 34 of 39
mrattray
in reply to: SoulAsasin

Try moving the form where you want it close it and then save the file. It should open next time where you left it.
Mike (not Matt) Rattray

Message 35 of 39
SoulAsasin
in reply to: mrattray

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?

Inventor 2012
Win 7 64-bit
Dell Precision T5400
Intel Xeon 2,5 GHz
8 Gb RAM
NVIDIA Quadro Fx 3700
Message 36 of 39
mrattray
in reply to: SoulAsasin

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

 

Mike (not Matt) Rattray

Message 37 of 39
SoulAsasin
in reply to: mrattray

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"?

Inventor 2012
Win 7 64-bit
Dell Precision T5400
Intel Xeon 2,5 GHz
8 Gb RAM
NVIDIA Quadro Fx 3700
Message 38 of 39
mrattray
in reply to: SoulAsasin

Yes.
Mike (not Matt) Rattray

Message 39 of 39
SoulAsasin
in reply to: mrattray

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

Inventor 2012
Win 7 64-bit
Dell Precision T5400
Intel Xeon 2,5 GHz
8 Gb RAM
NVIDIA Quadro Fx 3700

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

Post to forums  

Autodesk Design & Make Report