Create Drawings of sheet metal parts

Create Drawings of sheet metal parts

Anonymous
Not applicable
2,096 Views
20 Replies
Message 1 of 21

Create Drawings of sheet metal parts

Anonymous
Not applicable

I currently have a macro to create dxf's of all the sheet metal parts in an assembly with the Vendor or Category marked as laser.  I am now looking for some help creating a macro to Create drawings of those parts with a flat pattern view a side view of the flat pattern for the thickness and an Iso view of the folded part.  The only dimensions needed are the thickness and the bends.  I attached the macro for the dxf's to base off of.  Unfortunately this is bad timing as I won't be at work all next week but I would really appreciate any help.

0 Likes
2,097 Views
20 Replies
Replies (20)
Message 2 of 21

cadman777
Advisor
Advisor

Erik,

This looks like something you may want to consider:

https://apps.autodesk.com/INVNTOR/en/Detail/Index?id=5706339273400434437&appLang=en&os=Win32_64

It has a reasonable price.

You'll have to do the dimensioning yourself, but it can save you 10% of the drawing time in a project.

If you go to YouTube and look up Tekla automatic drawings or Tekla automatic dimensioning, you will see what Autodesk should have programmed into Inventor many years ago. Inventor is a database, just like all the other CAD programs. It's just a matter of 'git-'er done!' Autodesk.

 

Cheers ...

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
Message 3 of 21

Anonymous
Not applicable

I'l keep autodraw in mind, but I'm just an intern so I'd like to find a way to do it without any costs.

0 Likes
Message 4 of 21

cadman777
Advisor
Advisor

I hear ya.

But it's a 'tall order' for a freebie.

If I could help, I would.

Cheers ...

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
Message 5 of 21

Anonymous
Not applicable

I found this to use as a starting point https://clintbrown.co.uk/2018/10/07/automatic-drawings-with-ilogic/

but I can't seem to get it to work.  I keep getting an error saying:

Error in rule: Create Drawing, in document: TAY004-E101-I614_A CARRIAGE HOLDER ALT.ipt

ThisDrawing: This document "TAY004-E101-I614_A CARRIAGE HOLDER ALT" is not a drawing.

Which it isn't a drawing, but from what I understand it should run from a .ipt or an .iam

I sent him an e-mail, but if you know what might be causing this I would appreciate your help.

0 Likes
Message 6 of 21

cadman777
Advisor
Advisor

If you have a newer version of Inventor, this free tool may help shave time off your work:

Symetri Quick Views by Symetri

https://apps.autodesk.com/en/Detail/Index?id=6055662968820286099&appLang=en&os=Win32_64

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
Message 7 of 21

Anonymous
Not applicable

That looks pretty useful but I don't think It's really going to help that much with what I need done.

0 Likes
Message 8 of 21

cadman777
Advisor
Advisor

OK

So what are you trying to accomplish?

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
Message 9 of 21

Anonymous
Not applicable

The macro I have finds all the sheet metal parts in an assembly marked as LASER and exports them as dxf's  so if I can make a macro/ Ilogic rule to create the drawings all I would have to do is replace the export function with the drawing function.  

0 Likes
Message 10 of 21

cadman777
Advisor
Advisor

That's one of the main reasons I want to learn iLogic.

But that is a very difficult task.

I believe Autodesk has just begun to consider adding functions to the API for 'automatic drawings'.

IMO, this should have been an integral part of inventor for at least the past 5 years.

But that is an entirely different subject!

I have searched the internet high and low for such information, but have not arrived at any satisfactory solutions.

Sorry!

Incidentally, your request is REASONABLE.

It shows you have COMMON SENSE, and that you are NOT willing to SETTLE for commercial profit-driven product.

Join the anti-socialist club!

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
Message 11 of 21

Anonymous
Not applicable

I've found a little bit through hours of searching today.  I'll update this thread if I ever figure it out.

0 Likes
Message 12 of 21

JamieVJohnson2
Collaborator
Collaborator

For the most part you can create any automatic drawing you want with current Inventor API.  I have several automatic drawing routines that rip through hours of drafting work in minutes.  Whenever I find the drafter getting bored of the same 4 buttons over and over, I automate it.  Some tools I have written process thousands of commands and even process Inventor using parallel computing.  The best part, I can use the complex VB.Net code inside of the iLogic editor whereby expanding the tools of coding.  I prefer not to, because Visual Studio is still by far a much better code editor, but sometimes the situation calls for it.

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
Message 13 of 21

Anonymous
Not applicable

That's cool.  Would you be willing to edit one of you macros to make a drawing like the one I attached or at least get most of the way there.  I'm brand new to coding and would really appreciate your help.

0 Likes
Message 14 of 21

JamieVJohnson2
Collaborator
Collaborator

I can drop you some code snippets, but you need to format them to fit your process:

Adding a single dmension (this one used work points inserted as center marks (cm...)

 

 'deck length dim
                    giOne = invSheet.CreateGeometryIntent(cmDeckLengthStarts(i))
                    giTwo = invSheet.CreateGeometryIntent(cmDeckLengthEnds(i))
                    Dim lgdDeckLength As LinearGeneralDimension = invSheet.DrawingDimensions.GeneralDimensions.AddLinear(pIntent, giOne, giTwo, DimensionTypeEnum.kHorizontalDimensionType)
                    lgdDeckLength.Text.FormattedText += " DECK LENGTH"

Adding a imported symbol:

 'add centerline symbols
                    Dim strPrompts(0) As String
                    strPrompts(0) = "CAR"
                    lps.Clear()
                    pIntent = tg.CreatePoint2d(clCarCenterLines(i).StartPoint.X, carCLVertical)
                    Dim giCenterLine As GeometryIntent = invSheet.CreateGeometryIntent(clCarCenterLines(i), pIntent)
                    lps.Add(giCenterLine)
                    '   symbol for the cl of car on the side view
                    InsertSketchedSymbol("CL", invSheet, lps, strPrompts)

 

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
Message 15 of 21

Anonymous
Not applicable

The dimensions aren't necessary for what we use these drawings for so I would appreciate it if you helped me figure out how to get the views placed automatically first as that's what I need the most.

0 Likes
Message 16 of 21

JamieVJohnson2
Collaborator
Collaborator

something like this:

 'insert base view
            Dim viewOptions As NameValueMap = invApp.TransientObjects.CreateNameValueMap
            viewOptions.Add("SheetMetalFoldedModel", False)
            Dim vBaseFlat As DrawingView = InsertAndScaleBaseView(drawDoc, Model.InvDoc, sheet1, "FLAT PATTERN", pViewPosition, viewOrientation, viewStyle, False, 1.0, "1""=1""", viewWidthLimitInches, viewHeightLimitInches, viewCamera, viewOptions, True)
            vBaseFlat.ShowLabel = True
            'project side view (to show "Thick")
            pViewPosition = tg.CreatePoint2d(sheet1.Width * 2 / 5, sheet1.Height * 2 / 5)
            viewOptions.Value("SheetMetalFoldedModel") = True
            viewOrientation = ViewOrientationTypeEnum.kDefaultViewOrientation

Insert and scale base view basically does some custom formatting, but here is the actual add view line:

 Dim vBase As DrawingView = sht.DrawingViews.AddBaseView(docModel, pntView, dblScale, viewOrientation, viewStyle, strViewName, viewCamera, viewOptions)
  vBase.ShowLabel = True
vBase.ScaleString = strScale
'optional rotation if desired:
 vBase.RotateByAngle(DegreesToRadians(90))
Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
0 Likes
Message 17 of 21

Anonymous
Not applicable

I probably seem like an idiot, but like I said I have almost no coding experience and I keep getting syntax errors trying to use your codes.

0 Likes
Message 18 of 21

JamieVJohnson2
Collaborator
Collaborator

Erik, I'll have to be brutally honest.  I can't teach coding to this level in a few posts.  I get the whole novice thing, because I struggled like mad back in 2005 just to get a view created in AutoCAD in vb.Net.  Since then I have persisted through some good books, lots of help posts, and eventually joining the MSDN and Autodesk development networks, for making many code tools and bits (many of which I have posted here, look up my posts for lots of goodies).  As for the structure of coding, I doubt anybody can successfully post a bunch of code for anybody else to use, and have it work flawlessly out of the box, because each user's environment is different.  That is where you will need to get your own experience.  From what I am tossing around, my skill set is focused on Microsoft VB.Net coding on Windows Presentation Foundation Applications and User Control Libraries project templates.  Inside of that foundation I have found plenty of room to flourish as a CAD Tools, data integration, and database developer.  

 

Lastly, since this is a help forum and not a business site, I am only allowed so much time to help others without compromising my own business goals.  So, not much 'coding for hire' or even 'coding for free' will come out of here to a person who keeps asking without producing something for us to 'fix' easily.  

 

But don't let that stop you, keep working the problem till you are the next master on here.

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
Message 19 of 21

cadman777
Advisor
Advisor

Hey erik,

I found the attached pdf which may help you somehow.

I don't know how to program in VBA, and my iLogic sucks, but from what I've see in the past 2 weeks of intensive foraging on the Internet and in this forum, I'll never learn VBA. Jamie just proved that to me! Hopefully you CAN learn this, if you're young enough and have the aptitude and drive. It's all about being a rat in the rat race. So maybe the attached pdf will help you find your own work-path down the rat hole??

Cheers ...

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
Message 20 of 21

Anonymous
Not applicable

Thanks I'll try to figure it out.  Hopefully this will be helpful when I'm a real engineer and not just an intern.

0 Likes