Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ilogic rule to create automatic drawings

6 REPLIES 6
Reply
Message 1 of 7
saifme08
4501 Views, 6 Replies

ilogic rule to create automatic drawings

hi

i am a beginner in autodesk inventor ilogic. i am very much interested to know if there is an ilogic rule to create automatic drawings of all iparts/subassemblies from an assembly? can nyone pls provide me link if these issue is solved earlier or ilogic code? i will highly appreciate your kind help.

thanks in advance.

 

regards

-saif

6 REPLIES 6
Message 2 of 7
mdavis22569
in reply to: saifme08

Are you looking for an ILogic code to say .... Run ... when doing so: From the IPT or IAM it'll open an IDW (defaulted template picked in the rule) and base the multiple views based on a predetermined view?

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------
Mike Davis

EESignature

Message 3 of 7

Message 4 of 7
saifme08
in reply to: mdavis22569

Hi michaeldavis
Thanks a lot for your response. And i am sorry for my late response.
what i wanted to do is:
suppose i have an inventor assembly (.iam) file where three different parts and two subassemblies (each contain three parts) are contrained.
i want to wrte an ilogic rule that will search the assembly file and create
9 idw templates and make drawings(isometric view,top,front,left or right views are placed) for 9 different parts and 2 idw templates for two subassemblies drawing ((isometric view,top,front,left or right views are placed).
that means total 11 templates and 11 drawing sheets from one assembly.
is it possible to write an ilogic rule in top top assembly to do all this things?
Let me know pls.

regards
-saif
Message 5 of 7

Hi Curtis_Waguespac
Thanks a lot for your response. And i am sorry for my late response.
what i wanted to do is:
suppose i have an inventor assembly (.iam) file where three different parts and two subassemblies (each contain three parts) are contrained.
i want to wrte an ilogic rule that will search the assembly file and create
9 idw templates and make drawings(isometric view,top,front,left or right views are placed) for 9 different parts and 2 idw templates for two subassemblies drawing ((isometric view,top,front,left or right views are placed).
that means total 11 templates and 11 drawing sheets from one assembly.
is it possible to write an ilogic rule in top top assembly to do all this things?
Let me know pls.

i have visited the link you provided . Is the code posted by mehatfie fit for my requirements? i am posting it again here.
****
Imports Inventor.ViewOrientationTypeEnumImportsInventor.DrawingViewStyleEnum
Dim oDrawingDoc As DrawingDocument
Dim oPartDoc As Document
Dim oSheet As sheet
Dim oTG As TransientGeometry
Dim oView1 As DrawingView
Dim oView2 As DrawingView
Dim oView3 As DrawingView
Dim oView4 As DrawingView
ViewScale=3/16
'Ask to create drawing?
dwgQuery=MsgBox("Would you like to Create a drawing for this MODEL?", vbYesNo,"Drawing Selection")
If dwgQuery=vbYes
Then oPartDoc=ThisDoc.Document
'Define IDW Template File Location
oDrawingDoc=ThisApplication.Add.kDrawingDocument("C:\Vault_Work\PROJECTS\iLogic Parts-inprogress\iLogic Part Generators\Rectangular Transition Chute Generator\Template.idw", True)
oSheet=oDrawingDoc.Sheets.Item(1)
'Define 2d view bottom left corner points for four views
oPoint1=ThisApplication.TransientGeometry.CreatePoint2d(1, 1)
oPoint2=ThisApplication.TransientGeometry.CreatePoint2d(1, 6)
oPoint3=ThisApplication.TransientGeometry.CreatePoint2d(5, 1)
oBaseView=oSheet.DrawingViews.AddBaseView(oPartDoc,oPoint1, 3/16,kFrontViewOrientation, kHiddenLineDrawingViewStyle)
', KTANGENTEDGESON)
oView2=oSheet.DrawingView.AddProjectedView(oBaseView,oPoint2, kHiddenLineDrawingViewStyle, 3/16)
oView3=oSheet.DrawingView.AddProjectedView(oBaseView,oPoint3, kHiddenLineDrawingViewStyle, 3/16)
End If
*****
if i run the code inventor shows me syntax error in line 14 (Then oPartDoc=ThisDoc.Document)

what is wrong in this line?
let me know pls.
thank you again for your time.


regards
-saif
Message 6 of 7
mdavis22569
in reply to: saifme08

Is it possible, I'm sure it can be written ...HOWEVER It would be VERY time consuming ... there would be SO many variables. What happens if there are purchase items or fasteners .. or items you don't want an IDW for. What size template ... A, B, C, D, E .. .what scale .. it could put a 1000 part assembly on an A and the scale be 1/100. You'll spend all that time fixing or adjusting the IDW's in the amount of time that you can automate it to do it one at a time ..

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------
Mike Davis

EESignature

Message 7 of 7
saifme08
in reply to: mdavis22569

Hi michaeldavis
Thank you very much for your reply.
And you are right about so many variables.
what i want at this moment is to keep the part and subassembly number as variable. Other things should be kept as default to:
size template...A, scale.....3/16
All items should have an IDW. i mean just the part/subassembly number is variable.
i think something like an ilogic rule which will iterate through the assembly file and get a part > open a IDW template > place ISO,top,front,left views > auto dimensioning . Then again iterate through the assembly for another parts until all parts are finished.

if it is possible, then from where should i start?
do you have sample code something like this to follow?
Let me know pls.
regards
-saif

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report