Friday, 9 December 2016

Part Number on Flat Pattern

I’ve told you before I like helping out on Autodesk Answer Days and it’s good to keep an eye on that when it happens.




That’s when you get some of the best questions because a lot of people have done the research, know there is no solution available unless an Autodesk employee looks at the code and provide the insight or blends a quick bit of code for your problem.

As I am aware not all of you have the time for it I try and share the best, rare, exceptional that catches my attention

                Exactly this case for the question “How to get Part Number on Flat Pattern”.

                Seems we have covered this before and you are correct to think this but it was a bit different for we have showed how to do that from the drawing using a symbol note before the export; you can read it all again here.

                But this is different for what he wants is to have the part number on the flat pattern in the model and I am guessing that is because he wants to do emboss it, cut it out or just have it as a text on his flat pattern exports.

                You know you can export the flat pattern or just a face, right?

                Right click on Flat Pattern and choose Save Copy As with sat, dxf, dwg as output or right click on a face and choose Export Face As with dxf, dwg as output.

               
Flat Pattern Save Copy As..



Export Face As

                The solution is simple brilliant and Cai from Autodesk has provided the answer.  Create a sketch on flat pattern face with a text in it and the code bellow will change that text to Part Number. All you need to do is run the iLogic code and watch the magic taking place.
               
Dim oDoc As PartDocument
 oDoc = ThisApplication.ActiveDocument
 
Dim oDef As SheetMetalComponentDefinition
oDef = oDoc.ComponentDefinition
 
Dim oSK As Sketch
oSK = oDef.FlatPattern.Sketches(1)
 
osk.TextBoxes(1).Text=iProperties.Value("Project", "Part Number")

How good is that? Because I find it brilliant.        

         Of course the user needed some more; as it happens with this things and we jumped right back to help him out.

         What if there is no sketch on flat pattern? Can I prompt the user to create it?

         Cai replied:

If oDef.FlatPattern.Sketches.Count >0 Then
 oSK = oDef.FlatPattern.Sketches(1)
Else
 ' There is no sketch
End If


And I (late as usual) told him to use a try/catch; here is the complete code:


Dim oDoc As PartDocument
 oDoc = ThisApplication.ActiveDocument
 
Dim oDef As SheetMetalComponentDefinition
oDef = oDoc.ComponentDefinition
 
Dim oSK As Sketch
Try
    oSK = oDef.FlatPattern.Sketches(1)
    osk.TextBoxes(1).Text=iProperties.Value("Project", "Part Number")
Catch
    MessageBox.Show("Sketch not found" _
                    & vbLf & "Please crete a sketch first", "No sketch")
    
End Try


Later,
ADS photo credit: Panoramas Washington - National Gallery of Art - Calder - 8-11-2014 - 17h18 (license)

Thursday, 8 December 2016

Muse

                I am up! Are you?


that's me later in the day.

                It was a rare combination of things that got me awake and kept my mind going. I don’t have problem sleeping especially with the fatigue that has accumulated in the last years but it was a rare combination of things that got me awake and couldn’t force my mind to sleep again.

                The best thing to do now would probably head back to work and beat the commuting traffic but I doubt the access cards will work, powering up a complete building to allow a mad insomniac to check mails and detail pipe drawings.

                And while I was forcing myself to sleep, I got visited by the all-powerful and inspiring Muse which has whispered a couple of ideas and solutions that I didn’t thought possible.

                I bet you all experienced this, more than once. Once you start thinking about a problem, ideas tend to surface and then you find yourself flooded with solutions to all sort of problems for which you didn’t thought solutions could exist.

                Oh mighty Muse thank you for the ideas and please keep them coming, I am not complaining but I will have a terrible headache today at work and my productivity will surely be diminished.

                As if ~50 drafts were not enough, I figured what the hell, let me add another 10-15, typing on the phone leaning on my elbows; it’s not like I am busy and I have all the time in the world....NOT.

                Noam….
Are you there? Listening?

I got it! Really did it; I know how to create branch take offs with pipe cutbacks…

Noam, it’s doable and really simple you’ll see.

How, you ask?

A combination of empty branch fittings, cut-back iFeatures, and some routing tricks presented before, like pipe trim, etc. although normal routing should work, but it’s all in my mind.

What else?

                Cable trays and pipe supports created in Tube and Pipe. Why not? I bet you will agree with me on this one once you see the blog.

                Adaptive pipes, adaptive lengths; will try, not sure how that will work completely, might need another sleepless night. I am there 90% of the way. And why would you need this? Pipe supports again. You’ll see.

                I need to tell you how to author tapered threads fittings to a precise engagement distance.

                Creating rounded pipe lengths with the engagement option…

                Copying and pasting fittings, when I use it, how to remove them…

                Routing with non 90/45 deg elbows like 30 and 60 deg; this is actually done and tested by another internet friend and he accepted to share his results on my blog.

                Fixing the browser name of CC items and the long repulsive description for CC generated items; how about controlling how fittings are displayed in the tube and pipe style dialog when you browser for them.

                Couple of tricks with self-draining pipes and how I’ve created a balancing-suction pipe outlet between two vessels…
               
                But now, you’ll have to excuse me, I have some commuting to do before I prepare to meet my headache.


Later,
ADS
photo credit: Sheba_Also 11.5 Millon Views Not to night love I have a headache-1= (license)

Wednesday, 7 December 2016

Error Installing Updates

The other day I ran into a problem installing updates for 2015.

Error Installing Update

My spare time job as help desk support engineer as well as helping on Autodesk forum and other places requires me to have all version of Inventor as far as 2012.

Yes, I still get questions from user using inventor 2012!

So I have all these operating systems with each flavor of Inventor, 32 bit – 64 bit, win 7 and win 10 (pretty much all it’s used) on virtual machines which I fire up when needed.

However it’s easier to download the updates, service packs and patches on separate storage and have them all in one place for installation.

Everyone in a while I get this error when installing updates:

“This patch package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer patch package.”

This is a poorly documented error and the solution is dead simple.

All you have to do is copy the installation files on C:\ drive as close to root as possible. I have created a temp folder Updates on C:\ and ran the installation packages from there.

Success



Later,
             ADS


Monday, 5 December 2016

Home Use License

Do you know you can take your software with you and use outside work?

I bet London will soon look like this

“Home Use Rights is a benefit available to Autodesk subscriptions with multi-user access and maintenance plan customers. The benefit provides licenses for home use and allows employees to install and activate the software program at a home location away from the office for work related to business, personal education, or for training needs.”

Home use rights and software eligibility can be read here but pretty much every software from Autodesk is there.
               
                Those of you with multi-user network license can either check out a license (borrow) or request a companion stand-alone serial number.
                If you have single-user access subscription you can just reuse your existing serial number.
               
                I am not saying you should and become a workaholic like me but it’s nice to know you can have the option if you ever feel too good to go to work or it’s a one off taking care of a sick child or just waiting for the gas inspector.

Later

ADS.


photo credit: _Hadock_ Endless homes (license)

Thursday, 1 December 2016

Custom Elbow, Self Draining Lines P1

Self draining lines?

I’ve used those quite a lot on this past year and it seems we will continue in the ones to come.



I have been contacted by one of you (my internet friends) and asked if I think it’s possible to create custom length elbows and use it with Tube and Pipe.

                Apparently his company has open a support case with Autodesk and after a thorough investigation they were told it’s not possible and to continue constraining the fittings, one after the other just as they do now.

                So he has resorted to the dark side and contacted a bogus blogger to see if he has a possible solution. Happy to say I do have a possible solution but it’s up to him to decide if he wants to go the TP way.

                The biggest challenge is to create an elbow with custom angle and where the user is prompted to specify a length for the entry, exit legs (straight section of the elbow).

                Most important phase in the design process is to get the user requirements right and I have failed that from the beginning but I’ll blame the language barrier and the different time zones.

                All the companies I know buy 90deg elbows and they bend them to required angle because it’s cheaper this way. My initial impression was that they use 90deg elbows as well but they cut the legs at an angle (slope angle) rather than bending the elbow.

                Some good info emerged out of this and that’s why I decided to mention it. So keep it in the back of your mind in case you ever need to do something similar.

                There are a couple of methods to cut the legs back but some will give you errors down the line.

                Do not control the leg lengths by editing the sweep path because when removing the leg altogether (max cut) you will get errors on generating other members with 0 length legs.

                Do not author the part by using the leg face because that will fail. I will fail when you cut the face to an angle (the face is not circular anymore) and it will fail if you remove the straight leg completely, (face not existing anymore).

                Instead create sketch points and work points for your authoring connection setup.


Authoring work features

                While the elbow is 90deg the connection needs to be picked up as different angle, that is a must for self draining lines or you will not be able to select the fitting in the TP Style Setup dialog window.



Authoring angle



TP style dialog
                For that you need to create custom work axes but that’s easy if you create some construction lines in the sweep sketch. Check out my blog on authoring empty parts here.

                Because I wanted the users to have a minimum, maximum allowable distance and a 1mm increment (keep it nice and tidy) I have setup custom cells for my ipart table and that was a big waste of time.

                Do not create custom range cells or columns in the ipart table; they have no effect once published to content center. Instead publish it as it stands and alter the content center family table.


don't waste time here

                Now that we got that out of the way I will show you what my friend really wanted and how to create a proper custom length elbow to be used for tube and pipe self draining lines but that in the next blog.

                PS: I am doing a video for this as well…… more than a year since I’ve done a video !!!!

Here is the test elbow (the wrong one) in case you are looking for inspiration or just want to test it out.

Later,
ADS
               


photo credit: Hernan PiƱera Seated (license)

Monday, 14 November 2016

3D Panoramic Renderings

Forget about everything you learned on my blog, forget about all the nice little tricks, the TP videos, and any ilogic code given here.


Phone Glasses

If you will take just one thing out of this blog is to get yourself a pair of virtual glasses, they can be the cheapest you can find, like the google cardboard, and do a 3D panoramic rendering of your cad plant room.

Have I mentioned that I have been working on this Glue360 high purity water treatment plant for a pharmaceutical company? That is a whole series of blogs on it’s own but essentially it’s like NavisWorks in the cloud. Each uploads it’s own model (electrical, mechanical, structural, etc.) and you can see it on the web on any device anywhere in the world.

So I grabbed myself a copy of the model and did a high quality 3D panoramic rendering. We have been blown away, and never thought it would be such a cost effective, pure marketing power, highly accessible solution.

I can’t share that with you because of contractual clauses but I will share a 3D picture which I took by installing Google Cardboard Camera from the Google Cardboard set of apps in android market.

This is my new way of taking pictures, and this one taken on RHS Wisley (Royal Horticultural Society) includes sound as well and you are immediately transposed in the scenery. Wisley is one of the best gardens I have visited and in the summer we go there almost every weekend. It’s close, convenient and perfect place for my son to burn out energy (hyperactive one).

GET A PAIR OF glasses and try it out. Head over to Renderings360 and try some shared by the users..

If you're into plant's, factories, building design then you will like this one; although it doesn't even come close to what my plant looks like. You can see that the models are simplified, like those from Plant 3D and that's another reason I like Inventor, the quality is incomparable.

It is such a powerful tool that I told all our engineers never to take photos from now on but take 3D photos of our plants. We sometimes need to do as built model updates and this is so much better.

They could buy a box on their way to client’s site meeting; I will send them a link to the 3D rendering which opens on the phone's web browser and they can have a really powerful tool for their presentation.

Marketing was all over me and in 2 days they bought couple of glasses and off they went for Lab Innovations exhibit in Birmingham.

Enough said, … go get them

Here is the Wisley image.

Later,
ADS

Thursday, 10 November 2016

No news?

No news good news, right? Not in my case.


I haven’t diapered on some exotic island drinking coconut cocktails, in fact it was quite the opposite. I felt tired this year, more than usual and was wondering why that is and so I started looking for reasons.

While there could be others as well I stop looking when I found out that by the end of October we had almost 200% live contracts against last year. Cramming 2 years of work into a single one can be exhausting and to be honest I am not looking forward to next year if the trend maintains.

Furthermore (can’t help it) I stop and answer to all your emails, youtube and blog comments, inventor forum, personal messages as well as helping old colleagues.

Two week was special because we had Inventor Open Days, and I couldn’t miss that. What is that you ask? It’s when autodesk employees take a day off answering questions on the forum, but anyone can answer really. Thursday night I spent an extra couple of hours answering questions and trying to help them because on rare occasions like this you can get some really interesting questions and learn a lot.

In fact I saved a couple of posts that I really liked and intend to share them on the blog. Not stealing other people’s work but rather sharing them with those of you that don’t have time to read them all and would better subscribe to blogs like mine and get it as a concentrated pill.

As if this wasn’t enough I decided to get some virtual reality glasses, not the ultra expensive giga-bucks to ruin the economy kind but the cheap phone version. This is essentially just a plastic box where you stick your phone and you watch 3D stuff. Things like panoramic pictures, videos and the “piece de resistance” high quality CAD renderings.

Will have to expand on that on the next blog.

Later,
ADS


photo credit: Anders V "Read All About It" (license)