Ever wanted to drive an entire assembly from the top level but are struggling with skeleton frames or linked Excel sheets? This is probably your answer. Below is a great example of how simply copy and pasting some iLogic code can save you hours of time. It is important to set up your parts to have all the important parameters you want to use, but once that is it done, it is a simple case of changing your parameters at the top level and 'pushing' them to the parts and sub assemblies below. Check the video and try it out! The code you need is after the break: Public Sub Main () CopyUserParams () End Sub Private Sub CopyUserParams () If ThisDoc . Document . DocumentType <> Inventor . DocumentTypeEnum . kAssemblyDocumentObject Then MsgBox ( "The active document must be an assembly." ) Return ...
Pretty much every business has a template that shows this error message, but most people just click OK and carry on. What are styles? Styles exist in many different environments in Inventor. They hold information that you want to standardise and use again and again. For instance, in the drawing environment it holds your dimension styles, font setups, layers, leader appearance etc. In part files it holds lighting and text styles. Assemblies, appearances and sheet metal styles include unfold rules. These styles can be saved in two places: Locally in the template itself. Centrally in the style library (this should be the same library your colleagues share) What does the error mean? What this dialogue basically says is, that the styles in the template do not match the central library styles. How do you fix it? Open your template file. The location of this is shown under 'Folder Options' in the 'Projects' window on the 'Get Started' ribbon. Once the template is o...
Have you ever gone to place a drawing view of some sheet metal and the flat pattern option is greyed out? This little ditty I composed slips straight in your iLogic rule and simply unfolds the part and folds it back up again, creating a flat pattern in the process. Stick it on a trigger just before save in your template file and never have to worry about this happening again! Dim oDoc As PartDocument oDoc = ThisDoc . Document Dim State As SheetMetalComponentDefinition State = oDoc . ComponentDefinition If State . HasFlatPattern = False Then State . Unfold ThisDoc . Document . ComponentDefinition . FlatPattern . ExitEdit End If
Comments
Post a Comment