• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

rule ilogic export boards dwg and pdf

  • Thread starter Thread starter crisbeta28
  • Start date Start date

crisbeta28

Guest
Good morning to all,

Attached I put a word file with ilogic code used by us usually to extrapolate the set of tables of a set (pdf+dwg) and its components. the only problem it presents is that I would like to appear in the name of the dwg and pdf files created not only the name of the code of the part to which the design refers, but also the description of the part itself, so that we can quickly recognize even without opening the design the part to which it refers.

Do you have any idea how to do it? I tried but sincerely I don't know visual basic enough thoroughly.:mad:
 

Attachments

Thank you very much, when I have the chance I try and keep you updated. Thank you!
 
I have a problem with inventor 2017, I would like to do an ilogic to export the pdf of the table but I can't do it.
Can you help me?
Thank you.
 
nome_file=thisdoc.filename(true) 'with extension (false) without extension
' messagebox.show(nome_file, "title")
estensione = right (nome_file,3)
' messagebox.show(estensione, "title")

'{9c464203-9bae-11d3-8bad-0060b0ce6bb4} = lamiera
'{4d29b490-49b2-11d0-93c3-7e07060000000} = parte
'{bbf9fdf1-52cd-11d0-8c04-0800090be8ec} = tavola 2d
'{e60f81e1-49b3-11d0-93c3-7e0706000000} = assieme

'tipo=iproperties.value("project", "document subtype")
'if tipo <> "{bbf9fdf1-52cd-11d0-8c04-0800090be8ec}" then
'messagebox.show("eseguire il comando da un file di tavola (.idw).", "!!attenzione!!")
'exit sub
'else


path_and_name = thisdoc.pathandfilename(false) ' without extension
pdfaddin = thisapplication.applicationaddins.itembyid("{0ac6fd96-2f4d-42ce-8be0-8aea580399e4}")
odocument = thisapplication.activedocument
ocontext = thisapplication.transientobjects.createtranslationcontext
ocontext.type = iomechanismenum.kfilebrowseiomechanism
ooptions = thisapplication.transientobjects.createnamevaluemap
odatamedium = thisapplication.transientobjects.createdatamedium
if pdfaddin.hassavecopyasoptions(odatamedium, ocontext, ooptions) then
ooptions.value("all_color_as_black") = 0
ooptions.value("remove_line_weights") = 1
ooptions.value("vector_resolution") = 400
ooptions.value("sheet_range") = inventor.printrangeenum.kprintallsheets
'ooptions.value("custom_begin_sheet") = 2
'ooptions.value("custom_end_sheet") = 4
end if
'set the destination file name
odatamedium.filename = path_and_name & ".pdf"
'publish document
pdfaddin.savecopyas(odocument, ocontext, ooptions,odatamedium)

messagebox.show("in formato pdf", "file salvati:")

'end of ilogic rule - - - - - - - - - - - - - - - - - -
' end if
 
Fast cabbage!

It gives me two mistakes...
error in line 21: planned end of education.
error in line 23: expected end of education.

also can you save in the folder on the dedicated server?
Thank you so much!
 
I'm a little ignorant about the illogic commands, can you give me a tip or a link that explains to me their usefulness?
thanks in advance
 
Hello everyone,
I find it extremely useful the code in question, I wanted to ask you if you can change it so that you can take the boards associated with the 3d in another folder.
I tried to, but I can't figure out how to change the code.

Thank you in advance. .
 
Hi.
if you download the .zip file from previous posts, you must change the following part of the program:

- - - - - - - - - - - -pdf setup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
opath = thisdoc.path' this saves in the inventor source file folder
'opath = "c:\printpdf" ' this saves in the print folderpdf
'opath = "c:\users\mario.rossi\desktop\pdf" ' this saves in desktop

Good job
 
Good morning matteo,
Thanks for the answer, but I don't think I've explained well. .
I meant, running the code even if the drawings are not in the same folder as the axioms and details.
then setting a different path. .
 
Hi.
usually (also automatic conversion programs) require table 2d in the same folder as 3d
the question is: the 2d tables are in a different folder of the 3d but it is always the same; i.e. all the table files are in one folder?
 
Hi.
Yeah, I have a situation like that.

Project folder=>(axis and details +"table folder"

Unfortunately, I only need dwg...
 
Hi.
Yeah, I have a situation like that.

Project folder=>(axis and details +"table folder"

Unfortunately, I only need dwg...
I forgot, the folder, for each project, is always called tables. Is there a way to do something?
 
patience
write me some real example that I didn't understand
thank you 10000

example:
c:\signs\name1\table
c:\signs\name2\table
etc. .
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top