Inventor Customization

Inventor Customization

Reply
Active Member
hungsianglim
Posts: 10
Registered: ‎11-10-2012
Message 1 of 19 (1,309 Views)
Accepted Solution

Extreme drawing automation

1309 Views, 18 Replies
11-16-2012 05:36 AM

Hi all,

 

Greetings!

 

I am looking for a solution to the following situation:

 

  • One part
  • Two different part numbers
  • Three drawings for one part, in three different sheet formats, 1st and 3rd having the same drawing number (=part number)
  • Up to seven different materials

I need:

 

  • To automatically generate the three drawings (in idw or even PDF) after part creation and the content of the drawing is fully dimensioned and annotated for all available types of materials.

Any idea where I should begin searching?

 

Many thanks in advance.

 

Cheers

 

H.S.

Inventor PDS Premium 2013

Hi Kris,

 

This should do what you would like. It's the same concept as Ash with the File Name but a different opening mechanism.

 

------------------------------ Code ---------------------

 

Try
     docName = ThisDoc.PathAndFileName(False) & ".idw"
     doc = ThisApplication.Documents.Open(docName, True)
Catch ex As Exception
     MessageBox.Show("Unable to open Drawing", "Warning")
End Try

---------------------------------------------------------------------------------

 

Regards

Mitch

 

Let me know if it helps.... Kudos if it works!!!

 

Mentor
mehatfie
Posts: 163
Registered: ‎02-10-2012
Message 2 of 19 (1,305 Views)

Re: Extreme drawing automation

11-16-2012 06:15 AM in reply to: hungsianglim

Hi hungsianglim,

 

How complex are these parts?

 

Regards

Mitch

*Expert Elite*
jdkriek
Posts: 545
Registered: ‎03-29-2007
Message 3 of 19 (1,299 Views)

Re: Extreme drawing automation

11-16-2012 09:05 AM in reply to: mehatfie

Everything described is pretty easy, but really depends on your knowledge of programming and as mhatfield asked the complexity of the parts themselves.. There are a few base examples of drawing automation, but as with any custom drawing it's going to require custom programming to do exactly what you need.

Jonathan D. Kriek

Autodesk Inventor Certified Expert
Microsoft Certified Application Developer
_____________________________________________________
Did I help you? Please choose Accept as Solution or Kudos below
Active Member
hungsianglim
Posts: 10
Registered: ‎11-10-2012
Message 4 of 19 (1,281 Views)

Re: Extreme drawing automation

11-17-2012 05:09 AM in reply to: hungsianglim
Hi Mitch, Thanks for you reply. The parts are not overly complex. The headache for me is one of management & control and productivity. Elaboration: 1. Management & control We are currently producing all 3 sheets in one idw file. The actual steps are first create a drawing content on sheet #1, upon completion copy and paste the same into sheet #2 and #3. After that some information is removed from sheet #3 and the file is saved. At this point the job is considered complete. All data in the title block draw information from iProperties. 2. Productivity If the above already-cumbersome tasks were multiplied 10,000 times it is not difficult to imagine the kind of life I am now living! The entire process is slow and painful, and not very motivating (as an engineer). Thanks for commenting. Cheers H.S.
Active Member
hungsianglim
Posts: 10
Registered: ‎11-10-2012
Message 5 of 19 (1,280 Views)

Re: Extreme drawing automation

11-17-2012 05:12 AM in reply to: jdkriek

Hi Jon,

 

That's exactly my problem - I know next to nothing about this type of programming.  Or any programming!

 

But if there is really no better way I guess I will just have to acquire it.  In that case where should I begin?

 

Thanks in advance.

 

Cheers

 

H.S.

Contributor
00ash00
Posts: 12
Registered: ‎02-21-2012
Message 6 of 19 (1,268 Views)

Re: Extreme drawing automation

11-18-2012 06:18 AM in reply to: hungsianglim
Can you use the sketch dimensions in you drawing views, if so I have some code that we use, form an assembly file it opens up every referenced file, if that file has a part number, it looks to see if there is a drawing in the same folder as the referenced file (iam or ipt) if not, opens a template adds 4 views, scales the views to fit on A1 page, retreves the sketch dimensions, adds automated center lines, adds parts list. If ipt file is a sheetmetal part it will put a flat pattern on sheet 2 and adds a hole table to the top left hand corner. If a laser cut profile is required. The profile is placed onto sheet three and the border and title block is deleted and a laser note is added to the sheet then it is exported to dwg. The programme will also print to default printer and to pdf. Email me if this could be of any help.

Ash
IV 2013
AutoDrafter 2013
ash0968@gmail.com.au
Ash

Dell - T1650
Intel(R)Xeon(R) CPU E3-1290 V2 @ 3.70GHz
16GB
64-Bit
Windows 7 Pro
Inventor 2013 Build: 138
Active Contributor
Kris_Inv2013
Posts: 39
Registered: ‎07-19-2012
Message 7 of 19 (1,248 Views)

Re: Extreme drawing automation

11-19-2012 03:44 AM in reply to: 00ash00

Hi All, Hi Ash,

 

Please could I also have a copy of your clever code? At the mo I am only intending to open and update the exisitng referenced drawing from my top level asembly. But soon I will have to create new ones and copies and templates. This code would be of great help.

 

I am also considering to do my whole operation from the drawing environment rather than from the assembly. (spreadsheet and iLogic driven assy(about 150 components), that automaticaly generates a new iteration of the master assy, updates drawings and BOMs, prints .dwf & BOM)

 

Just out of couriosity, would you guys run the iLogic codes and this automated process from the drawing or from assembly mode considering that the drawing is parent in relation to the assembly?

 

Any comment would be much appreciated, unfortunately I am alone with this project at our company and hav no chance for a bit of brain storming on best practices.

 

 

Regards,

 

Kris

 

Contributor
00ash00
Posts: 12
Registered: ‎02-21-2012
Message 8 of 19 (1,213 Views)

Re: Extreme drawing automation

11-20-2012 05:39 AM in reply to: Kris_Inv2013

Hi Kris,

 

Can you send me a work flow of what you would like the code to do and i will try to modify it to suit your needs,

The code is in VB.Net and it works as a standalone exe.

 

With regards to ilogic, I have a large assembly that uses a spreadsheet to drive a complete sprial conveyor, i have found that if you get each part to reference the spreadsheet and each assembly to reference the spreadsheet directly your model will work and update better. this way if you open a part at any time it will get the latest info from the spreadsheet same with the assemblies. if you use ilogic in an assembly to modifiy the parts it can cause a problem during the updating of drawings if you open parts first and print then then open up the assemblies and print them, this will print off the old parts before your assembly has had a change to update them. 

Becarefull with your view reps, the Master view rep will show everything, i have 1's and 0's in my spreadsheet to suppress parts that are not required and every now and then a  sub-assembly will default back to the master view rep and casue the model to fail, i have added ilogic code in each assembly to set the view rep to a custom one.

 

Hope this helps

Ash

Ash

Dell - T1650
Intel(R)Xeon(R) CPU E3-1290 V2 @ 3.70GHz
16GB
64-Bit
Windows 7 Pro
Inventor 2013 Build: 138
Active Member
hungsianglim
Posts: 10
Registered: ‎11-10-2012
Message 9 of 19 (1,203 Views)

Re: Extreme drawing automation

11-20-2012 01:46 PM in reply to: hungsianglim

Hi Ash,

 

Yes very much interested in the codes.  Please help.

 

Thanx!

 

Cheers

 

H.S.

Active Contributor
Kris_Inv2013
Posts: 39
Registered: ‎07-19-2012
Message 10 of 19 (1,177 Views)

Re: Extreme drawing automation

11-21-2012 04:36 AM in reply to: 00ash00

Thanks for your help Ash.

Essentiall what i am trying to achieve now is a code/snippet that opens up the drawing of the assembly I work with. The rule to do this would be in the assembly. I can launch the drawing via iLogic specifying the absolut path to it. But it is not goog enough, I would like to reference it from the active document.

 

(The right click context menu on the top level assembly (on the model tree in Inventor) has the option of 'Open Drawing'.

Is there a way to do that via iLogic? Unfortunately I can't figure it out if there is. I would like to open and update the relevant drawing.)

 

Thanks,

Kris

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.