How far did you go with ilogic

How far did you go with ilogic

tolgay.hickiran
Advisor Advisor
2,242 Views
34 Replies
Message 1 of 35

How far did you go with ilogic

tolgay.hickiran
Advisor
Advisor
Hello everyone,

This threas is rather opened out of curiosity. We've been focused really hard on parametric modelling for 5 months now and we've fully modeled 2 5k+ item parametric assemblies with drawings and necessary lists. The first assembly took us around 2 months to build and we've deeply learned how to improve ilogic rules and global parameter usage.

We are a company which produces powder paint curing ovens and all other powder paint process machinery(www.electron.com.tr ). I can share some model pictures if anyone is interested how the assembly works and updates with parameters.

The assemblies have around 200 rules in total for main assembly sub assemlies and parts. We simply give around 10 parameters (like the curing oven length or the process piece width) and the entire assembly updates around 5 minutes. Before this the design time would have taken us 5 working days with all lists included.

Ilogic is a really strong tool for us and we are really keen on meeting and talking with people who are using ilogic to its full power.

I believe this is the way of doing things now, automating the design just like automating the manufacturing processes.

We would like to see how the world is using ilogic on design automation. Cheers

Some worthwhile ideas
Copy Design should rename ilogic Rules too!
Why Nastran In-CAD doesn't have an SDK?IMPLEMENTED!

Tolgay Hickiran
Founding Partner
SignatureSignature

website
emailskypelinkedinyoutubeemail

2,243 Views
34 Replies
Replies (34)
Message 21 of 35

salariua
Mentor
Mentor

I am doing a lot of ilogic automation for tanks and vessels, but it's only for plant layouts and quoting purposes; we are not manufacturers.

 

However you will like Ahmad Hegazy's videos

 

check this link  

 

Adrian S.
blog.ads-sol.com 

AIP2012-2020 i7 6700k AMD R9 370
Did you find this reply helpful ?
If so please use the Accepted Solutions or Like button - Thank you!
Message 22 of 35

Jef_E
Collaborator
Collaborator

@salariua wrote:

I am doing a lot of ilogic automation for tanks and vessels, but it's only for plant layouts and quoting purposes; we are not manufacturers.

 

However you will like Ahmad Hegazy's videos

 

check this link  

 


Thanks for those links. It's nice to see something that looks the same. I guess the problem for me, is that we don't have strongly typed standards to use, we always work with client spec's and it's had to anticipate all these "options".

 

But it kinda work the same as my first release. A little faster though but also only tiny tanks are editable. I think it's editable as in TOP-DOWN? We build large vessels starting from Tan to Tan line +- 20meters too + 100 meters. I tried modeling these beasts TOP-DOWN but if you have a smaller tank you have a lot of garbage in the assembly and in the vault. So now I'm aiming at bottom-up start from an empty assembly. And model the shell in +- 3minutes 3D! ( if all information is ready to go ). No excess parts in the assembly is the motto and this is well received by my colleagues!

 

I also try to anticipate the almighty scope change of the client and keep everything as flexible as possible.

 

At my previous work this approach was used as the tanks where so strongly standard that a serial number could describe the full tank dimensions 😄



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
Message 23 of 35

tolgay.hickiran
Advisor
Advisor

I found Ahmad Hegazy's videos couple of days ago and they are really good. I tried to reach out to him from facebook but didn't get a reply from him. All in all, his way of doing things are pretty neat. 


Some worthwhile ideas
Copy Design should rename ilogic Rules too!
Why Nastran In-CAD doesn't have an SDK?IMPLEMENTED!

Tolgay Hickiran
Founding Partner
SignatureSignature

website
emailskypelinkedinyoutubeemail

0 Likes
Message 24 of 35

salariua
Mentor
Mentor

He replies to youtube comments. He is on G+, hangouts....etc.

 

https://plus.google.com/105379790711069287196

 

Adrian S.
blog.ads-sol.com 

AIP2012-2020 i7 6700k AMD R9 370
Did you find this reply helpful ?
If so please use the Accepted Solutions or Like button - Thank you!
Message 25 of 35

dg2405
Advocate
Advocate

two years ago i made a parametric assembly energy chain with positional representations:

 

Message 26 of 35

tolgay.hickiran
Advisor
Advisor

We applied to AU Extension Istanbul to help people understand how ilogic tools and the assemblies created with ilogic works. I hope Autodesk Turkey will accept our request and give us the chance to show our work to sector professionals. 

 

We've never been to an AU event so what do you guys think? Do we have a chance getting in?


Some worthwhile ideas
Copy Design should rename ilogic Rules too!
Why Nastran In-CAD doesn't have an SDK?IMPLEMENTED!

Tolgay Hickiran
Founding Partner
SignatureSignature

website
emailskypelinkedinyoutubeemail

0 Likes
Message 27 of 35

Anonymous
Not applicable

Ok, So I got the code for the floor sorted and it works pretty good so I thought I'd share it. Still no audio, but for what I'm showing, it doesn't really matter. Hope you all enjoy

Message 28 of 35

Anonymous
Not applicable

Attached is a zipped file of a video showing an ilogic automation that I built. Enjoy!

Message 29 of 35

Anonymous
Not applicable

Jay,

 

Just curious. Approx. how many lines of code to accomplish what you're doing here?

 

Nicely done BTW.

 

 

Frank

0 Likes
Message 30 of 35

Anonymous
Not applicable

Frank,

Not counting the vba code for the database search, the rest was 9 rules with just around 2400 lines of code.

Wayne

 

Not sure if you wanted Jay, but the email came to me.. so I replied.

Message 31 of 35

tolgay.hickiran
Advisor
Advisor

Hey Frank,

 

We have around 50 rules and a total of 1400 lines of code in our structure. 

 

There are a lot of suppresses/replaces, level of detail changes and cases which takes a lot of lines of code i must say.

 

We also implemented an auto dxf creator to get a single page of laser cutting. Essentially the codes only take "part by part" drawings and make them single dxf files, we not only did that but also created a single dxf file, which automatically index all the different types of sheet metal, Total Qty - Material - Thickness. 

 

With this program ( written in vb.net ) we got around 1900 lines of code.

 

@Anonymous kudos to you too, its a really neat program!


Some worthwhile ideas
Copy Design should rename ilogic Rules too!
Why Nastran In-CAD doesn't have an SDK?IMPLEMENTED!

Tolgay Hickiran
Founding Partner
SignatureSignature

website
emailskypelinkedinyoutubeemail

0 Likes
Message 32 of 35

Anonymous
Not applicable

Jay,

 

    I still have miles to go with my code. I haven't begun to add in the code that will create and save new part and assembly models to new project folders. Still debugging the sub assemblies. I'm thinking at this point to put all the subassembly model options in the master blank, like I did with my tailgate models. Right now I'm fighting with a side assembly model. I have a shaft that won't change size (length) when I drive the side height dimension. as soon as I do anything with iLogic it jumps to max length and stays there no matter what I do. I'm stumped at this point. I can't find anything in the code that would cause this to happen, it just started doing this.

   I found that I have to be really careful about modifying constraints in these assembly models. Changing one small constraint can make the whole model go wonky. So when I build / assemble the model, I try to plan ahead when applying constraints. I keep finding better ways to build models that help when it's time to start writing iLogic code to drive the models.

   I'm getting a pretty good handle on the iLogic syntax, but no matter how closely I look at the VB? code, I'm not seeing the rhyme or reason to it. I've done SCADA programming years ago, designed the screens, wrote the back code and link code for the PLC and that was a lot of fun. What is the advantage to using VB over the snippets in the iLogic interface? Does it run faster, take less code to accomplish the same task? It seems a lot of the guys here prefer the VB.

   BTW, you mentioned that you change LoD within iLogic. Could you post that bit of code? I've been opening my files with "options" and selecting "Custom" to get my models to behave properly.

   Thanks for the input and reply, hope you have a great day!

 

Frank

0 Likes
Message 33 of 35

salariua
Mentor
Mentor
I am sure you know this all but here's food for thought:
@Anonymous wrote:

Jay,

 

I have a shaft that won't change size (length) when I drive the side height dimension. as soon as I do anything with iLogic it jumps to max length and stays there no matter what I do. I'm stumped at this point. I can't find anything in the code that would cause this to happen, it just started doing this.

 

not sure if this is your case but usually I use planes to set my part size. Planes can take positive/negative dimensions while sketch entities can only take positive dimensions therefore sometimes during the update they jump on the other side and the solution is still valid, not throwing errors.

 

   I found that I have to be really careful about modifying constraints in these assembly models. Changing one small constraint can make the whole model go wonky. So when I build / assemble the model, I try to plan ahead when applying constraints. I keep finding better ways to build models that help when it's time to start writing iLogic code to drive the models.

 

You might want to consider using coordinated origin where you can. I've seen a full Mill (Cold Rolling Mill) done from a single point, everithing to the right had positive dimensions and left negative dimensions (even on drawings).

 

 

 


Additionally here's my answer on a different post regarding performance, speed, and large assemblies.

 

 

All the elements that need to move by driving the constraints or by changing the constraint value can and should still be located with constraints but the rest can be located with coordinated origin and grounded.

 

Another thing to consider are joints ! Although not ideal a single joint can replace 3 constraints so computing time for the position of occurrences is 3x faster.

Joints are not my favorite tool because they use faces and edges and this goes against my rule to constraint everything as much possible with the origin planes and features.

 

On a small list I would look at:

- Joints

- Have as many grounded components as possible

- Disable cross part file references

- Disable adaptive parts and features

- Suppress link on derived parts.

- Disable Flexible Assemblies.

 

 

I would also investigate the techniques in Large Assembly manual here:http://help.autodesk.com.s3.amazonaws.com/sfdcarticles/kA230000000tfTNCAY/Large%20Assembly%20Instru...

 

ADS

 

Adrian S.
blog.ads-sol.com 

AIP2012-2020 i7 6700k AMD R9 370
Did you find this reply helpful ?
If so please use the Accepted Solutions or Like button - Thank you!
Message 34 of 35

Jef_E
Collaborator
Collaborator

@Anonymous wrote:

   I'm getting a pretty good handle on the iLogic syntax, but no matter how closely I look at the VB? code, I'm not seeing the rhyme or reason to it. I've done SCADA programming years ago, designed the screens, wrote the back code and link code for the PLC and that was a lot of fun. What is the advantage to using VB over the snippets in the iLogic interface? Does it run faster, take less code to accomplish the same task? It seems a lot of the guys here prefer the VB.

I'm getting a pretty good handle on the iLogic syntax, but no matter how closely I look at the VB? code, I'm not seeing the rhyme or reason to it.

 

There is not much rhyme to see, you need to make it rhyme 🙂 work with the API and follow the API object model this model you can use as a guide to find where certain object can be referenced.

 

you can find it here, just correct the 2014 to the correct year ( assuming you installed the developer tools )

C:\Users\Public\Documents\Autodesk\Inventor 2014\SDK\DeveloperTools\Docs

What is the advantage to using VB over the snippets in the iLogic interface? Does it run faster, take less code to accomplish the same task? It seems a lot of the guys here prefer the VB.

 

The iLogic snippits only let you do so much and you don't have much control. What if you want to do something that is not predefined in a snippit? You will be stuck.. ( but the most common things are included ).

 

If you write directly to the API using vb.net your code will be much longer, this because the iLogic snippits are functions or methods that are written behind the scenes. In vb.net you have to write it yourself.

 

For example:

 

iLogic turn object visible/invisible snippit

Component.Visible("PartA:1")

 

vb.net code sample using API (still use ThisApplication iLogic snippit to run in the iLogic environment)

Dim oApp As Application
oApp = ThisApplication

Dim oDoc As AssemblyDocument
oDoc = oAppActiveDocument

Dim oDef As AssemblyComponentDefinition
oDef = oDoc.ComponentDefinition

For Each oOcc As ComponentOccurrence In oDef.Occurrences

	If oOcc.Name = "PartA:1" Then
		oOcc.Visible = False
	End If

Next

What is the advantage of this vb.net code over the iLogic snippit? nothing... does exactly the same in 10 lines difference. But lets say you want to do something more with the occurrence I can just add that bit in my IF statement.

 

Things the API lets me control for the ComponentOccurrence Object and this is 10x more than iLogic snippits can do. But you can also combine the two when working in the iLogic environment.

 

Methods

Name Description
ChangeRowOfiAssemblyMember Method that changes the row in the iAssemblyFactory this occurrence references. This method can be used only if the IsiAssemblyMember property returns True.
ChangeRowOfiPartMember Method that changes the row in the iPartTable this iPartMember represents. This method can be used only if the iPartMember property is True.
CreateGeometryProxy Method that creates a proxy object for input object. A proxy object represents another object within the assembly space. Queries made on the proxy object are returned with respect to the assembly space, not the space the real geometry exists in.
Delete Method that deletes the occurrence. This is the equivalent of the user deleting the occurrence interactively.
Edit Activates this component occurrence for editing by the end user via the user interface.
ExitEdit Method that causes the component occurrence to return from the edit mode and into the environment specified by the input argument. If the ComponentOccurrence is not currently active (i.e. this is not the same occurrence as returned by AssemblyComponentDefinition.ActiveOccurrence), then this method does nothing.
GetDegreesOfFreedom Method that returns the available degrees of freedom for the occurrence.
GetDisplayMode Gets the display mode type - default or override.
GetReferenceKey Method that generates and returns the reference key for this entity.
GetRenderStyle Gets the render style of this occurrence.
Replace Method that replaces the occurrence or all instances of an occurrence with another file.
SetDesignViewRepresentation Method that sets a design view representation for an assembly occurrence.
SetDisplayMode Sets the display mode and type - default or override.
SetLevelOfDetailRepresentation Method that sets a level of detail representation for an assembly occurrence.
SetRenderStyle Sets the render style of this occurrence.
SetTransformWithoutConstraints Method that sets the position and orientation of the occurrence, ignoring any constraints on the occurrence. When the assembly is recomputed the occurrence will reposition to honor the constraints.
ShowRelationships Method that shows all of the assembly constraints, joints and iMate objects associated with this occurrence.
Suppress Suppresses this occurrence.
Unsuppress Method that unsuppresses the occurrence.

Properties

Name Description
ActiveDesignViewRepresentation Property that returns the name of the active Design View Representation for an assembly occurrence. This property returns a null string in the case where a design view representation was set for the occurrence non-associatively (i.e. with the 'Associative' flag turned off). Supported occurrences of parts and assemblies.
ActiveLevelOfDetailRepresentation Property that returns the name of the active Level of Detail Representation for an assembly occurrence.
ActivePositionalRepresentation Read-write property that gets and sets the name of the active Positional Representation for an assembly occurrence.
Adaptive Property that gets and sets whether the occurrence is adaptive or not. A value of True signifies the occurrence is adaptive. Setting this property is not supported in Apprentice.
Appearance

Read-write property that gets and sets the current appearance of the component occurrence. The appearance asset being used when setting this property must be from the current document’s AppearanceAssets collection, otherwise an error will occur. Setting this property with an asset will set the AppearanceSourceType to kOverrideAppearance. Setting this property to Nothing removes the override and results in setting the AppearanceSourceType to kMaterialAppearance so that the component occurrence will display using the appearance associated with the native part or the weld bead.

When getting the value of this property, the appearance as currently displayed is returned. If you want to know if this is the original appearance as defined by the part or subassembly, or is an override appearance you can use the AppearanceSourceType property.

AppearanceSourceType Read-write property that gets and sets the appearance source type. This can only be set to kMaterialAppearance to clear the overridden appearance. This is often used in conjunction with the Appearance property to understand where the current displayed appearance is defined.
Application Returns the top-level parent application object. When used the context of Inventor, an Application object is returned. When used in the context of Apprentice, an ApprenticeServer object is returned.
AttributeSets Property that returns the AttributeSets collection object associated with this object.
BOMStructure Gets and sets the BOM structure override.
Constraints Property returns the collection of constraints that are acting on the occurrence.
ContactSet Gets and sets whether the component belongs in the contact set.
ContextDefinition Property that returns the object this occurrence is in the context of. For example, all coordinate data returned by the definition is in the space of this ComponentDefinition.
Definition Property that returns the object this occurrence references.
DefinitionDocumentType Gets the type of the Document whose occurrence this is.
DisabledActionTypes Gets and sets the action types (ActionTypeEnum) valid for this component occurrence.
Enabled Property gets and set whether the occurrence is enabled or not.
Excluded Property that gets and sets whether the occurrence is excluded in the active row of the iAssembly factory. This property returns False and cannot be set to True if the parent document is not an iAssembly.
Flexible Property that gets and sets whether the occurrence is flexible or not. A value of True signifies the occurrence is flexible. The property fails for occurrences of part.
Grounded Property returns whether the occurrence is grounded or not. Returns True if the occurrence is grounded. Setting this property is not supported in Apprentice.
HasBodyOverride Property that returns a Boolean specifying whether the occurrence path contains body-modifying assembly features.
iMateDefinitions Property that returns the iMateDefinitions that are available from this occurrence. The iMateDefinition objects returned are actually proxies for the various iMateDefinition objects. These can be used as input to the Add and ValidResult methods of the iMateResults object.
IsAssociativeToDesignViewRepresentation Read-write property that gets and sets if this occurrence is associative to a design view representation or not. If True it is associative and can be set to False to break the associativity. If False, it cannot be set to True. Instead you can use SetDesignViewRepresentation to redefine which design view representation to use and you can define the associative state then.
IsiAssemblyMember Property that returns whether the ComponentOccurrence is an iAssemblyMember. The property returns True if the ComponentOccurrence is an iAssemblyMember. This property always returns False for occurrences of part documents.
IsiPartMember Property that specifies if the ComponentOccurence is an iPartMember. The property is True if the ComponentOccurence is an iPartMember.
IsPatternElement Property that indicates whether this occurrence represents a pattern element. In the case where this occurrence represents a pattern element, this property returns True. The PatternElement property can be used to get that pattern element.
IsSubstituteOccurrence Property that returns whether this occurrence references a substitute part in the context of a substitute level of detail representation.
MassProperties Property that returns the MassProperties object. This supports performing mass properties calculations for this particular occurrence.
Name Property that allows you to get and set the name of the occurrence. The display name is the name displayed in the assembly browser for the occurrence.
OccurrencePath Gets the path of immediate (directly instanced) occurrences that make up this occurrence.
OverrideOpacity Gets and sets the opacity of an occurrence.
Parent Gets the parent object from whom this object can logically be reached.
ParentOccurrence Property that returns the parent of this occurrence. This property is only valid for the occurrences in a multi-level assembly that are not in the top level. The parent occurrence is the occurrence representing the subassembly this occurrence is contained within.
PatternElement Property that returns the pattern element this occurrence represents. In the case where this occurrence is not part of a pattern this property returns Nothing. The IsPatternElement property can be used to check if this occurrence is part of a pattern.
RangeBox Property that returns a Box object which contains the opposing points of a rectangular box that is guaranteed to enclose this object.
ReferencedDocumentDescriptor Property that returns an enumeration of descriptors that represent the native document references held by this document.
ShowDegreesOfFreedom Property that gets and sets whether to display the degrees of freedom for the occurrence. This value is not persisted with the document.
SubOccurrences Property that returns the collection of occurrences for an occurrence. This property applies to occurrences that represent a subassembly. The collection returned provides access to the occurrences contained within the subassembly. If this collection is obtained from an occurrence that represents a part, it will not contain any occurrences.
Suppressed Property that returns whether this occurrence is suppressed or not.
SurfaceBodies Property that returns the SurfaceBodies collection for the occurrence. This property applies to occurrences that represent a part and provides access to the B-Rep of that part. The B-Rep queries will return coordinate data in the context of the component definition that served as the starting point to access the occurrence, which can also be accessed through the ContextDefinition property.
Transformation Property that returns and sets the transformation for the occurrence. The transformation matrix defines the position and orientation of the component within the assembly. When setting the transform of an occurrence the actual change in position and orientation of the occurrence is limited by the constraints on the occurrence.
Type Returns an ObjectTypeEnum indicating this object's type.
Visible Property gets and set whether the occurrence is visible or not.


Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
Message 35 of 35

Anonymous
Not applicable

Hey Frank,

 

Been a long time since i've replied sorry about that. Below is the code we generally use to change LoDs.

 

comp0 = Component.InventorComponent("MontajTabanPanel:1")

comp0.SetLevelOfDetailRepresentation("MontajTabanPanel")

 

If you have any further questions feel free to ask.

 

How are your designs going?