Design and Manufacturing solutions through Digital Prototyping and Interoperability

Tag Archives: Autodesk

AutoCAD Layers Deep Dive Series: Paper Space Layouts

Magic is partially about slight of hand, “Now you see it, now you don’t” with the other part about selling it to the audience, making them believe that the bird just appeared or that they did really just see a rabbit come out of the hat. Paper Space Layouts really aren’t that much different in that we want to take our model space geometry and using AutoCAD’s tool-set (slight of hand), sell it to the audience by presenting it in a way that is easy for them to understand, seeing only what we want them to see. A big component of presenting the Paper Space Layout is Layers. We can control the visibility and properties of the layers per viewport and there are many tools for making it easy to accomplish.

Palming Card Trick Magic

Image courtesy of Steven Depolo via Flickr

Plot Styles

Back in the day (pre-AutoCAD 2000) there was one Plot Style option, which turned into Color Dependent Styles. With Color Dependent Styles (CTB) you use colors to control how the drawing will plot. For example you could make anything green plot black with a thicker lineweight and anything yellow plot purple with a lighter lineweight. Although Color Dependent works in many situations it is limiting as you then need to pay attention to which colors you are assigning to your layers. You would not want to assign green (from the above example) with its thicker linewidth to your centerline layer. With AutoCAD 2000 Autodesk introduced Named Plot Styles (STB) in which you define named styles and assign these to your layers, removing the dependency on colors. To create (or modify) a Plot Style go to the Application Menu (big “A” in the upper left corner) and from the Print sub-menu select Manage Plot Styles. From the Explorer window that appears select Add-a-Plot Style Wizard AutoCAD Add-a-Plot Style IconHere’s a short video showing the process. Notice how many aspects of the object can be set with the Plot Style, including things like Line End Style and Line Join Style which cannot be configured anywhere else.

One catch about AutoCAD and its Plot Styles is that each drawing can only use one type, as in you cannot access both CTB and STB from the same drawing. Color Dependent drawings can be converted to Named Styles using the command CONVERTPSTYLES.. AutoCAD CONVERTPSTYLES Warning You will be prompted to select the Named Style to apply to the drawing.This can be altered at anytime from the Page Setup dialog. Within the Layer Manager you can adjust the styles assigned to each layer http://youtu.be/Rdaov8SGjpw

Freezing Layers

Layers can be toggled OFF or FROZEN to make them invisible and not shown. This removes the layer from view from Model Space AND all Paper Space Viewports. So what can be do for a specific viewport? This is where VP Freeze and New VP Freeze comes into play. AutoCAD VP Freeze Layer Manager While on a Paper Space Layout activate a viewport (easiest is to just double-click inside one) and from the Layer Manager toggle the VP Freeze toggle for the layers you do not want to appear in the Viewport AutoCAD Layers VP Frozen   New VP Freeze toggles the layer to be automatically Viewport Frozen in each New viewport you create. Where can you use this? Say you are detailing a house and just finished detailing all the electrical requirements and you will be moving on to the plumbing and HVAC. Since the electrical layers will no longer be required you can toggle the New VP Freeze option meaning that it will stay visible in the existing viewports but will automatically be invisible for each new viewport The Layer tool Thaw All Layers has no effect on VP Frozen Layers… but Layer Freeze does and it includes a toggle to either freeze the layer of the selected object or VP freeze the layer. When you start the command, before picking anything, right-click and select Settings, then Viewports. You have the option for either Freeze or VPFreeze. Layer Off actually has the same option meaning you can use the Layer Off tool to select objects in the active viewport and have the layers VP frozen opposed to being turned off within the entire drawing. The feature VP Freeze Layers in All Viewports Except Current does exactly as described. Start the command and within the active viewport select the layers you want to remain visible in the active layer but become VP Frozen in all other Viewports AutoCAD VP Freeze Layers in All Viewports Except Current

Layer Properties

Similar to freezing a layer in a viewport (VP Freeze) layer properties can be overridden on a viewport by viewport basis. What the walls to be red in one viewport but cyan in the next? No problem. To override the layer properties you need to first activate the viewport. Once activated you can use the Layer Manager to adjust the properties. AutoCAD highlights all adjustments, making it very easy visually to see the layers that have been adjusted.

AutoCAD Viewport Layer Properties Overriden

To quickly revert the layers the right-click menu provides a shortcut to remove the overrides from selected layers or all layers for the active viewport or for the entire drawing.

AutoCAD Remove Layer Viewport Overrides

Layer States and Viewports

In the article on Layer States we explored how layers are in a constant state of change… layer on, layer off, layer thaw, layer lock, layer color change, layer freeze, layer off, layer on, repeat, and repeat again. Also how its very common to perform the same set of state changes on a group of layers and by using Layer States you can “Save, restore, and manage sets of layer settings

AutoCAD tracks which Space you are in when you create a Layer State and provides an option to capture the settings as Viewport Overrides. This means when you apply the Layer State to a viewport only that viewport is effected by the layer setting adjustments

AutoCAD Paper Space Layer States

 

Autodesk Simulation Nastran Launch: 2 New Nastran Products Emerge

After reviewing NEi Software and the factors that led Autodesk to purchase the company, it would be good to take a look at what they’ve done with their investment. Autodesk took no time at all getting their new toys out on the market and into the hands of their existing customers.

Autodesk Releases 2 Nastran Products

Autodesk has officially branded two new products by way of the acquired NEi IP, namely:

  • Autodesk Nastran 2015
  • Autodesk Nastran In-CAD 2015

Autodesk Simulation Nastran Launch Mitch Muncy

Autodesk Nastran 2015

The former NEi Nastran solver technology has been released to the public in order to continue its licensing through Autodesk. This means that analysts using the FEMAP/NEi Nastran combination for example, can continue to do so through the company. The only caveat is that Autodesk will not continue to sell Siemens PLM FEMAP as NEi had done. The perpetual license fee for the solver was stated to be below $10K USD.

Autodesk Nastran solver solutions include:

  • Linear Static and Steady-State Heat Transfer
  • Normal Modes, Buckling, and Prestress
  • Advanced Dynamics
  • Nonlinear Analysis
  • Nonlinear Transient Heat Transfer

The solver has already been updated and sent to the existing Simulation Mechanical customers through a product update not more than 30 days after the NEi purchase. Simulation Mechanical will continue to act as the main front end for Autodesk’s simulation customers, permitting the flexible use of its existing solvers as well as Nastran. The company stated that it intends to continue to provide the Nastran solver to subscribers of Simulation Mechanical without adjusting the subscription cost.

Not only did Simulation Mechanical receive the new solver, but additional meshing capabilities have been added as well.

Unfortunately, many advanced features, such as the MultiContinuum Theory (MCT) and other third-party integrations will not be present in the base Nastran solver package. Those integrations were NEi’s proprietary property, were part of additional licensing, and nothing has specifically been stated about the delivery of those solutions at this time.

Along with Nastran came NEi’s verifications and QA research, including over 100 NAFEMS benchmarked examples that ship with every release. Mitch Muncy, Simulation Product Manager for Autodesk (Formerly the Executive Vice-President of NEi Software) pointed out that NEi ran over 5000 test problems per software release.

While discussing product testing, Mitch said,

“…any time any issue came up, we were very dedicated to making sure that it [NEi Natran] was one of the most accurate packages on the planet”.

Autodesk Nastran In-CAD 2015

Priced similarly to the Nastran 2015 solver, In-CAD allows Inventor and Dassault Solidworks users to perform linear and non-linear analyses directly from their native CAD environments. In-CAD adds a Ribbon tab with all of the associated pre and post processor tools needed to start and review the Nastran solution.

Nastran In-CAD includes most of the core capabilities of the Autodesk Nastran solver, including linear and non-linear analyses, as well as some composite materials analyses. These are divided up similarly (perhaps identically) to the NEi Designer and Analyst packages, but re-branded as follows:

Nastran in-CAD Basic*

  • Linear Statics
  • Linear Steady State Heat Transfer
  • Normal Modes
  • Buckling
  • Prestress Static and Normal Modes
  • Thermal Stress
  • Assembly Modeling with Contact
  • Composites

Nastran in-CAD Expert*

Autodesk Nastran in-CAD Expert adds to the Basic set with the following capabilities:

  • Nonlinear Static and Nonlinear Transient Response
  • Linear and Nonlinear Transient Response
  • Frequency Response
  • Nonlinear Steady State Heat Transfer
  • Nonlinear Transient Heat Transfer
  • Automated Impact Analysis (AIA™) and Drop Test
  • Random Response
  • Advanced Nonlinear Material

Equally important are the inclusion of advanced element types, allowing far more complex and capable studies. Advanced modules and 3rd party integrations are still available as optional modules. This means the Inventor users can get the full power of Nastran finally in their environment. Now that I think about it, having the refined CAD capabilities of Inventor would make setting up complex analysis models so much easier.

The license for In-CAD is open and flexible, and can be checked out by both Inventor and/or SolidWorks users in the same organization.

Autodesk Inventor Nastran In-CAD Thermal Analysis Formula One Upright & Brake Assembly

Autodesk Inventor Nastran In-CAD Assemblies Differential Assemblies

Autodesk Inventor Nastran In-CAD Non-Linear Static Stress Hedge Trimmer

Autodesk’s Simulation Business Line Manager, Vic Vendantham concluded the topic with this:

“From a go-to-market perspective, we think about two specific strategies: there is the inherent need to work inside a design environment, where engineers want to work in an increasingly CAD embedded workflow, with seamless transmission between the CAD model and the simulation environment, and they want to add a level of explorative analysis. We also need to think about the high-end analyst who want to push the technology and perform simulations that have never been done before. I think that Nastran gives us the opportunity to deliver the right solutions to the right people.”

Nastran Editor

Autodesk will continue to include the Nastran Editor software that NEi Software developed with the solver, giving users the ability to quickly affect features and advanced options in the Nastran Input File from a convenient front end. This is available to all users of Autodesk Nastran and Autodesk Nastran In-CAD software.

Autodesk Nastran Editor

Product Support

Autodesk currently plans to continue support for the entire product line from NEi Software. That means that existing NEi customers will continue to get help and updates as expected. When pressed about the In-CAD software for SolidWorks, Autodesk managers insisted that there would be continued development for that product, noting that they continue to support HSMWorks for the SolidWorks users, after purchasing that company as well.

Nothing was stated about what the future holds for Nastran, its 3rd party integrations, or other NEi products. The only thing that the company would say is that it’s still early in the development process and nothing has been decided at this point.

Closing Thoughts

The NEi purchase represents a windfall of simulation IP. NEi Nastran is a well-established product in the aviation and automotive industries, and is slam-full of enhancements. Purchasing NEi allowed Autodesk to bypass the development and testing process for some of their own technology integrations, and potentially hand down the entire gambit of aeronautic analysis capabilities to everyone using Autodesk Nastran, including users of Autodesk Simulation Mechanical and to some extent, Autodesk Inventor.

However I think that there is a bigger picture that needs to be recognized. Autodesk has been working for some time to deliver software platforms that help unify simulation workflows and model data, and present the user with a far more fluid experience and work environment. Nastran fills a gap in a very capable inventory of simulation software, giving Autodesk a well-rounded engineering portfolio. The company is in a great position to ramp this effort up and bring that technology into a unified platform.

Vic eluded to this in his presentation when he said,

“What [Nastran] also does is it helps us build on interoperability… If you think about the foundational denominator for these products, you can imagine how the structural platform becomes the baseline from which we can begin to develop a cohesive intuitive environment of multiphysics. This [acquisition] presents an opportunity for us to unify everything and bring all of it together.”

If Autodesk wants to emerge on the other side of the heavy industry curtain, it will need to advance the development of their Nastran software. Not only will they need to continue to license the aviation specific analyses (like aeroelasticity), but must maintain the integrations as well as develop some of their own solutions … or buy them.

No matter what the company does in the next five years, one thing is certain: They just bought one hell of a powerful, well-placed non-linear multiphysics platform to build on and I want to play…

References and sources

* Information gathered from the NEi Nastran website

Images courtesy of Autodesk, Inc.

Autodesk Simulation Nastran Launch : Why NASTRAN? Why NEi?

After returning from the Autodesk Nastran Launch a couple of weeks ago, I discussed the company’s need to upgrade their simulation technologies. Large manufacturing industry segments lean towards software that can handle very complex studies; some specialized industries need tools that can perform studies that are quite complex in nature.

Unless Autodesk decides to invest heavily in developing innovative methods of computing large complex structure arrays as well as numerous solving algorithms, a quick stop at the local stock exchange to pick up some existing intellectual property might be a better way to go.

So Autodesk decided to go the purchase route, and pull in NEi’s Nastran solver variant which is a truly wonderful tool to have in house.

Why Nastran?

Nastran is universally recognized as the defacto Finite-Entity Analysis (FEA) standard, having been developed by NASA in the late 1960’s. The code was quickly released to the public, and as of the spring of 2014, three large companies develop their own enhanced brand of Nastran, namely MacNeal-Schwendler Corporation (MSC), Siemens PLM Software, and NEi Software. These companies have spent decades developing their Nastran variants.

The Nastran solver capabilities include:

  • Linear Static and Steady-State Heat Transfer
  • Normal Modes, Buckling, and Prestress
  • Advanced Dynamics
  • Nonlinear Analysis
  • Nonlinear Transient Heat Transfer

Autodesk’s Simulation Business Line Manager, Vic Vendantham, noted during the briefing that,

“…Nastran is already a standard, a brand, in fact it’s an eco-system that revolves around trusted, accurate, powerful, efficient and robust capabilities. The aerospace industry is already standardized on Nastran as a platform, and we have this unique opportunity … to take this and develop it and offer it to our customers.”

Autodesk Nastran Analysis capabilities

Autodesk’s purchase of a NEi Nastran fills numerous gaps in their simulation offerings, adding more complex and powerful non-linear capabilities, more efficiency, and gives the company a scalable platform from which to move ahead.

Why NEi?

That is probably a better question. The answer is almost as simple.

NEi Nastran is the youngest of the big-three variants, and as such was likely in a better position to be purchased. Better still, the NEi IP includes some nice solutions and integrations that reach beyond the standard analyses you’d expect from Nastran, including*:

  • Tension only cable and shell elements
  • Multi-layer isotropic and orthotropic composite analysis support
  • Progressive Ply Failure Analysis (PPFA™)
  • Automated Surface Contact Generation (ASCG™)
  • Automated Edge Contact Generation (AECG™)
  • Automated Impact Analysis (AIA™)
  • Numerous 3rd party aviation specific software integrations

…and much more.

Autodesk NEi Nastran Acquisition Launch Vic Vendantham

Vic emphasized some advantages NEi offered and noted,

“NEi Software has done an incredible job working to establish themselves as the industry standard for aerospace…Autodesk is in a unique position where we can take that and expand it to a variety of industry segments.”

Additionally, Firehole Composites (or the company formerly known as Firehole Composites), partnered with NEi Software around 2010 in order to deliver some of the Helius:MCT composite technology noted above to NEi Nastran users. That technology is currently owned by Autodesk in their Simulation Composite Analysis software, and many users of Autodesk products including myself, were looking forward to that technology being handed down to other CAD and simulation products. Autodesk now has a great opportunity to deliver these.

Mitch Muncy, Simulation Product Manager for Autodesk (Formerly the Executive Vice-President of NEi Software) stated that one of the important factors in this purchase was NEi having aligned themselves with Autodesk’s efforts in software development. This permitting the extremely fast Nastran rebranding and immediate integration into Autodesk’s existing software. During his discussion, Mitch pointed out:

“We wanted to be industry leaders in composites, so we were focused on putting in advanced technologies…Nastran has strong capabilities in a wide range of uses, but we also wanted to make it easy to use.”

Possibly the most compelling reason for purchasing NEi is their Nastran In-CAD product that was built for the SolidWorks CAD environment. Autodesk has successfully integrated other SolidWorks based purchases into their Flagship Inventor 3D CAD software in the past. This purchase gives Autodesk Inventor users the full power of Nastran including non-linear solutions, right inside their CAD environment. That product is already being marketed as Autodesk Nastran In-CAD 2015.

Vic added,

“One of the big assets that NEi Software brings to the table is the extensive industry expertise that they have put in place. They have already focused on advanced materials… so there is an opportunity for us to very quickly make an impact through advanced materials technology. NEi Software also has expertise in the aerospace industry, and we see this as an opportunity to continue to contribute in that space as well as push into other industries like automotive for example”.

Autodesk Nastran Launch Future Success

Thoughts

Nastran is wonderful. I have enjoyed working with Siemens PLM FEMAP / NX Nastran and am looking forward to seeing how NEi’s (now Autodesk’s) variant handles some problems I have encountered. The benefits from this purchase seem innumerable, and nearly impossible to choose my favorite; Scalability, Non-linear materials in Autodesk Inventor, specialized aeronautical studies integration? Autodesk has already let some of the solver technology loose, which we will look at in our next issue.

References and sources

* Information gathered from the NEi Nastran website

Images courtesy of Autodesk, Inc.

Autodesk Simulation Nastran Launch : Where They are Now

When Autodesk purchased NEi in early May, 2014, they said absolutely nothing. A hint got around quickly but still nothing official was stated until Derrek Cooper, Director of Simulation at Autodesk, released a teaser that seemed to keep the public demeanor at an even murmur. Still there were people all over the industry a bit uneasy about what this all meant, and just how much did Autodesk buy?

The company invited the media out to their Lake Oswego office to introduce some key people, initiatives, and to explain what was really happening with NEi Nastran, and why.

NEi Software Acquisition

Autodesk’s Simulation Business Line Manager, Vic Vendantham, discussed the details of the NEi purchase, how it was handled, and exactly how much NEi intellectual property (IP) was acquired, and most importantly, how it will affect Autodesk’s simulation portfolio.

Autodesk NEi Nastran Acquisition Launch Vic Vendantham

How Much of NEi was Purchased?

All of it. As stated in the press briefing,

…there will be no further branding of software by NEi.

Numerous former employees of NEi have joined Autodesk, including Executive Vice-President, Mitch Muncy.

Autodesk Purchases NEi Nastran

Why Buy More Simulation?

Autodesk needed an efficient and powerful non-linear solver; Period.

Autodesk has invested heavily in Simulation in the past decade. Most of their simulation products are based on purchased IP, including:

  • Inventor Professional Static Stress Analysis Environment – Plasso
  • Simulation Mechanical – Algor
  • Simulation MoldFlow – Moldflow Corporation
  • Simulation CFD – cfdesign
  • Simulation Composite Design – Firehole Composites
  • And now Nastran – NEi Software

Autodesk’s simulation power-users have been watching to see what the company would do to fill in the ‘non-linear’ gap. The company’s Simulation Mechanical software is a powerful analysis package, and already offers dynamic analysis and non-linear material types, as well as basic multi-physics handling such as thermal stress, etc. Autodesk’s Inventor CAD software lacks non-linear capabilities in its simulation environments, as well the company’s newly developed Sim 360 product. However where no one thought any advancement would be made in Inventor, Sim 360 was thought of as a possible candidate for such support.

There is a line however, that gets crossed even in Simulation Mechanical in terms of efficiency of not only the iterative solver, but also some multi-physics workflows and general software limits. Analysts that have tried a variety of simulation platforms can attest to the complex assembly handling and wide possibilities that Nastran offers.

Autodesk has quietly acknowledged these needs, but previous actions and statements made by the company have led many to believe that their focus would remain on the market that their products were more widely used in, i.e. the Small-Medium Business (SMB) manufacturing and design market. Companies in the heavily entrenched aviation and automotive industries rely on more complex solutions provided by other software vendors, including Nastran based solvers.

Why doesn’t Autodesk simply develop a more capable transient and non-linear solver? We will answer that very question in our upcoming article.

AutoCAD Layers Deep Dive: Layer Translator and Reconciling Layers

Layer Translator

You’ve received a batch of drawings from an outside source… customer, vendor, sub-contractor… and the layers do not match your own company standards for layers. The properties are wrong, the names are different, and you’re looking at a lot of work to get the drawings to standard. Don’t fear, our AutoCAD Layers Deep Dive series delivers the Layer Translator!

AutoCAD CAD Standards Ribbon LocationThe Layer Translator is used to map a set of layers to the standard set of your choosing. If the layer in the drawing is called A-Wall-Partition and your standard calls for WALLS you would map the layer so that WALLS is added to the drawing and all objects currently on A-Wall-Partition are moved to WALLS and take on the properties of WALLS. A-Wall-Partition would be removed from the drawing.

From the CAD Standards Tools select Layer Translator. Use the Load button to add the desired layers, the ones you want to map to. You can use existing drawings (DWG), templates (DWT), and standards (DWS).

AutoCAD Layer Translator initial viewThe Map Same button is used to match layers that have the exact same name, but more than that it insures that these layers have the same properties as the destination layers.

After using Map same you go through the list mapping the layers to their target. In this example I take all A-ANNO-TTLB layers and map them to the TITLEBLOCK layer. Not all layers need to be mapped as you can leave layers as they are.

AutoCAD Layer TranslatorOnce you are satisfied with the mappings you can save this as a drawing. This mappings drawing can then be used to load in the mappings into other drawings you have received from the outside source

Select Translate to make the magic happen!

Layer Translator Before After

Reconciling Layers

Once the layers have been translated, or really with any drawing, how do you manage the layers so that you are aware of layers that are added? Especially in situations where you are not even aware that layers have been added, like when you insert a block. For this you can use the built in Layer Reconciliation process. The AutoCAD Help explains it the best…

Unreconciled layers are new layers that have been added to the drawing and have not yet been acknowledged by the user and manually marked as reconciled.

The base in which AutoCAD uses to compare is set the first time the drawing is saved. At this initial save the existing layers are reconciled and all new layers added, either manually or by some other process, are considered unreconciled. Now sirens, buzzers, and warnings are not going to start just because an unreconciled layer has been found, but it gives you the option to review these layers at any time and decide what to do with them

The Layer Settings are important with this feature. If you want to use the Reconcile option you need to enable New Layer Notification and select whether just to evaluate xrefs or all new layers. You also need to configure when you want AutoCAD to notify you of new (unreconciled) layers. The options are on Open, xref attach / detach, Restore layer states, on save, and on block insert.

AutoCAD Layer SettingsWithin the Layer dialog a layer filter is automatically created to isolate just unreconciled layers. To reconcile the layers (accepting them to the drawing) right-click on them and select reconcile)

AutoCAD Reconcile LayerWhen new layers are added you will see a message similar to this….

AutoCAD Unreconciled New Layers NotificationIn Review

Hopefully I’ve shown you a couple tools to not only take a drawing and make it to your standard, at least layer wise, but shown another option for keeping you within your defined standards. If you liked this article let us know using the comments below and keep an eye out for the next in our series of diving deep on AutoCAD Layers.

Time to Tame the Beast! Learn to Customize Autodesk Inventor

Autodesk Inventor API - Object Model

Recently, a friend (and colleague) asked me how I go about planning the development of a new application or customisation project. He already has a pretty good handle on code structure and syntax, but struggles to know where to start in actually bringing his idea to life. In his words, he suffers from “the worst kind of writers’ block.” I totally sympathise with this issue as I have the same problem myself, quite frequently. The truth is, unless I’m working on a commercial project that has been carefully scoped, budgeted and scheduled, most of the time I just ‘hack’ something together. Having said that, there are definitely a couple of tips and tricks I can share which should help novice coders get started with customising Autodesk Inventor. If there is enough interest, I could do a similar article on the Vault equivalent.

I’m going to split this up into a couple of categories:

  1. Interrogating a live document to learn from and capture information
  2. Writing pseudo code to figure out the ‘flow’ of your program

Interrogating a live document

Usually when I start working on a customisation job, I only have a rough idea of what I want to achieve. With a limited mental picture of how the finished tool may look, often the only thing I know at the start, is the rough area of Inventor I’ll be working with. For example, if I’m building a tool to ensure that the designer fills out all the appropriate metadata for a model, I know straight away, that I’ll be working a lot with iProperties.

Autodesk Inventor API Documentation

API Documentation for Autodesk Inventor

To find out more where these objects are stored, and how they interact with other objects, you need a reference. The API documentation for Inventor, while thorough, is pretty dry to read and can be difficult to navigate if you’re unfamiliar with it. By using the little trick below however, you can see the API objects in a live document, populated with real data, which makes it a lot easier to understand. Let’s say, for example, you’re looking for the “Work Point” object that represents the origin of a particular part. Now of course can go into the model browser and find it, but what if you want to access it programmatically, where does it live in the structure of the model document? Watch the video below to see how to get this information quickly.

Interrogating the Open Document in Inventor VBA Environment

The API is a complex beast, with a lot of objects, and a deep structure. To give you a head-start, the table below lists a few of the objects and collections that I use most often.

Object / Collection Contains
Document.ComponentDefinition Parameters / Constraints / Work Geometry / Occurrences / Mass Properties
Application.Documents File Operations (Open, Save etc.)
Document.Materials Materials
 Document.PropertySets iProperties
 Document.ReferencedDocuments Document References

Pseudo-code

Before diving in to the actual code, I find it is often helpful to design the logic and flow of the program by using diagrams like flowcharts. Additionally, writing out the decisions that need to be made, in plain English, can help get things clear in your head. Writing pseudo code allows you to get the structure down quickly, without worrying about the syntax and intricacies of the programming language that you will be working in later. So what is pseudo-code exactly, you may ask? I’ll try to explain with an example.

Let’s say that we have a model of a box, whose length can be manipulated. Additionally, it’s colour is dependant on it’s length. Short boxes are red, medium ones are yellow, and long ones are green.

  • Maths
    • Length < 150mm — Red
    • 150mm <= Length < 250mm — Yellow
    • Length >= 250mm — Green
  • Plain English – If the length of the box is less than 150mm, then make it a red colour. If it’s length is between 150mm and 250mm, then make it yellow, and if it is longer than 250mm, then make it green.
  • Pseudo-code

Pseudo-Code

 

  • Actual code (VB.net for example)

VB Code

Hopefully these techniques give you some confidence to get stuck in and try your first Inventor customisation project. While I’d suggest you begin with iLogic rules and forms, sometimes you hit a wall with iLogic’s scope, and you need to delve into the API to access the areas you want to work with.

’til next time…