• このフォーラムは、www.cad3d.it/forum1 - イタリアのデザインコミュニティの機械翻訳です。いくつかの用語は正しく翻訳されていません。

フラットパターンilogicエクスポート

  • Thread starter Thread starter Cast16
  • Start date Start date

Cast16

Guest
ciao a tutti

qualcuno ha un buon ilogic in grado di esportare i flat pattern di tutte le lamiere dal assieme?

fino ad oggi ho usato il pooblish tool di matprop (trial) ma purtroppo ieri ha deciso di smettere di funzionare.

esportava le lamiere con formato: nome file-materiale-spessore-quantita' in assieme. adesso esporta solo il nome file.

va ancora come dovrebbe solo dal livello ipt. ho provato a contattare matprop ma non avendo pagato niente dubito che mi darano una mano. era il addin più usato ogni giorno.
 
ciao matteo
si, sono come sempre sono stati...
avevo aggiornato 2 settimane fa' dopo aver installato inventor 2020.
ieri ho provato tutto: installare-disinstallare publish tool ma niente da fare...2019-10-15 12_18_47-Autodesk Inventor Professional 2020.png
 
forse è una limitazione della versione trial, dopo un po' non funziona piu
io sto ancora utilizzando la versione 2013 e si è automaticamente caricata tramite i moduli aggiuntivi in tutte le versioni
 
per caso sai come esprtarre la quantita' via ilogic?
riccordo di avere una vecchia. esportava tutto: materiale-spessore ma non quantita'
 
se non erro....
occorre attivare su tools la voce "# write qty......." poi nelle options del dxf attivare qty
_foto__198.jpg _foto__199.jpg
 
se ricarichi una vecchia versione di publishtool, attivando al sua opzione "# write qty, scrive la custom iproperties della quantità e la usa per definire il nome file "idvarl0001_lamiera dec. 4010_4mm__1x.dxf"; se invece vuoi solo le qty, puoi scaricare ed installare questo: quantity tool _foto__205.jpg

gratuito
https://apps.autodesk.com/invntor/it/detail/index?id=6538586607773659444&applang=en&os=win64

a pagamento
https://apps.autodesk.com/invntor/it/detail/index?id=7198768975917432995&applang=en&os=win64
 
se ricarichi una vecchia versione di publishtool, attivando al sua opzione "# write qty, scrive la custom iproperties della quantità e la usa per definire il nome file "idvarl0001_lamiera dec. 4010_4mm__1x.dxf"; se invece vuoi solo le qty, puoi sc
ciao
la vecchia versione do pubblishtools non va piu' con inventor2020.
sono riuscito a mettere insieme un codice:
Code:
        if thisapplication.activedocument.documenttype <> documenttypeenum.kassemblydocumentobject then
            messagebox.show("please run this rule from the assembly file.", "ilogic")
            exit sub
        end if

        'define the active document as an assembly file
        dim oasmdoc as assemblydocument = thisapplication.activedocument
        dim oassydef as assemblycomponentdefinition
oassydef = oasmdoc.componentdefinition

dim obom as bom
obom = oassydef.bom

obom.partsonlyviewenabled = true

'change item("parts only") to item(3) or your language specific description
'if you don't run inventor english
dim obomview as bomview = obom.bomviews.item("parts only")

dim obomrow as bomrow

for each obomrow in obomview.bomrows
    'set a reference to the primary componentdefinition of the row
    dim ocompdef1 as componentdefinition
    ocompdef1 = obomrow.componentdefinitions.item(1)
    
    dim compfulldocumentname as string = ocompdef1.document.fulldocumentname
    dim compfilenameonly as string
    dim index as integer = compfulldocumentname.lastindexof("\")
    
    compfilenameonly = compfulldocumentname.substring(index+1)
    
    'messagebox.show(compfilenameonly)
    
    dim qty as string
    qty = obomrow.totalquantity
    
    iproperties.value(compfilenameonly, "custom", "qty") = qty
next
      
        dim oasmname = oasmdoc.displayname.replace(".iam", "")
'get user input
rusure = messagebox.show ( _
"this will create a dxf file for all of the asembly components that are sheet metal." _
&         vblf & "this rule expects that the part file is saved." _
&         vblf & " " _
&         vblf & "are you sure you want to create dxf for all of the assembly components?" _
&         vblf & "this could take a while.", "ilogic - batch output dxfs ",messageboxbuttons.yesno)
if rusure = vbno then
return

end if
opath = thisdoc.path
odatamedium = thisapplication.transientobjects.createdatamedium
ocontext = thisapplication.transientobjects.createtranslationcontext
ocontext.type = iomechanismenum.kfilebrowseiomechanism
ooptions = thisapplication.transientobjects.createnamevaluemap
'get dxf target folder path
ofolder = opath & "\" & oasmname & " - laser"
'check for the dxf folder and create it if it does not exist
if not system.io.directory.exists(ofolder) then
system.io.directory.createdirectory(ofolder)
end if
'-          - - - - - - - - - - - -component - - - - - - - - - - - -
'look at the files referenced by the assembly
dim orefdocs as documentsenumerator
orefdocs = oasmdoc.allreferenceddocuments
dim orefdoc as document
'work the the drawing files for the referenced models
'this expects that the model has been saved
for each orefdoc in orefdocs
iptpathname = left(orefdoc.fulldocumentname, len(orefdoc.fulldocumentname) - 3)& "ipt"
'check that model is saved
if(system.io.file.exists(iptpathname)) then
dim odrawdoc as partdocument
odrawdoc = thisapplication.documents.open(iptpathname, false)
ofilename = left(orefdoc.displayname, len(orefdoc.displayname))
ofilename1 = orefdoc.displayname.replace(".ipt", "")
dim ocompdef as sheetmetalcomponentdefinition = odrawdoc.componentdefinition
try
'set the dxf target file name
try
customname =iproperties.value(ofilename, "custom", "qty")
catch
customname ="xxx" 'wert, wenn ipropertie pf_prt_znr nicht existiert
end try
dim material as string = orefdoc.activematerial.displayname
othickness = orefdoc.componentdefinition.thickness.value*10


 
odatamedium.filename = ofolder & "\" & ofilename1 & " - " & material & " "& othickness  &"mm -  " & customname  & " off.dxf"
 

ocompdef = odrawdoc.componentdefinition

dim sout as string
sout = "flat pattern dxf?acadversion=2004&outerprofilelayer=iv_outer_pr?ofile"
ocompdef.dataio.writedatatofile( sout, odatamedium.filename)

ocompdef.flatpattern.exitedit
catch
end try
odrawdoc.close
else
end if
next

va abbstanza bene. solo che vorrei impostare i layer dxf come si fa tramite il file ini. per esempio vorrei che i sketch siano layer yellow, colore giallo. sapete come fare?
 
ciao a tutti,
sono riuscito a trovare la soluzione. bisogna sostituire la parte finale del codice con questo:
Code:
ocompdef = odrawdoc.componentdefinition

dim optionlist as list(of string) = new list(of string)()

optionlist.add("acadversion=2004")
optionlist.add("outerprofilelayer=0")
optionlist.add("interiorprofileslayer=0")
optionlist.add("unconsumedsketcheslayer=yellow")
optionlist.add("unconsumedsketcheslayercolor=255;255;0") 'here i make the unconsumedsketcheslayer lines red!
optionlist.add("") 'you can add other options here
optionlist.add("") 'and more options
' if you want you can add more lines for more options

dim sout as string
sout = "flat pattern dxf?acadversion=2000" _
+ "&invisiblelayers=iv_tangent;iv_feature_profiles_down;iv_arc_centers;iv_bend;iv_bend_down;iv_tool_center;iv_tool_center_down;iv_feature_profiles;    iv_feature_profiles_down"

 
for each opt in optionlist
    sout = sout & "&" & opt
next
sout = sout & "?ofile"
ocompdef.dataio.writedatatofile( sout, odatamedium.filename)

ocompdef.flatpattern.exitedit
catch
end try
odrawdoc.close
else
end if
next

grazie matteo per il supporto.
 
お問い合わせ
このフォーラムへようこそ。
英語のフォーラムでコメントをフォローし、たくさん貢献できると確信しています。
私はほとんどこの投稿を見て、私の論理ルールを改善する方法を尋ねるに頼っていたが、あまりにもお金を費やす場所を決定する機会のない従業員である、私は無料のソリューションを望んでいた。
 
シートメタルパーツなので、数量の問題は簡単ですので、特定のコンポーネント "onlyparts"で検索し、数量をコピーする必要があります。
以下を共有するのは、私が準備するコードです。
あなたの問題を解決する方法のあなたの考えを間違いなく与えることができます。
私はあなたもよく理解しています, 私はまた、従業員です. 私はこのフォーラムやその他に入力しました, 多分来年私はあなたの大陸のために解決する必要がありますので、, 家族のグループ化の理由のために, 私は変更のために準備しなければなりません, 私は人々を満たし、私のサポートを与えるしたいと思います, 多分私は将来的にあなたの必要があります
世界中では雇用状況が困難であることを知っています。
私は、フォーラムのあなたと人々に私の最高の挨拶を送っています。







サブメイン()

お問い合わせ[-------Create the folder inside the project folder called DXF Files
Dim oProject As DesignProject = ThisApplication.DesignProjectManager.ActiveDesignProject
Dim oProjectPath As String = Left(oProject.FullFileName, (InStrRev(oProject.FullFileName, "\", - 1, vbTextCompare)))
Dim New_Folder_Path As String = oProjectPath & "DXF Files"
'MessageBox.Show(New_Folder_Path)
My.Computer.FileSystem.CreateDirectory(New_Folder_Path) '] dim oasmdoc アセンブリドキュメント = このドキュメント.document

'ask ユーザが rev レベル
dim rev_level を文字列 = ""
rev_level = inputbox(エンターレブレベル)、"creating dxf ファイルをアセンブリ全体に"

dim r_part を文字列として
dim omaterial 文字列として

oasmdoc のドキュメントとして各ドキュメントの リファレンスドキュメント
doc.subtype = "{9c464203-9bae-11d3-8bad-0060b0ce6bb4}" の場合、
お問い合わせ
r_part = doc.displayname
omaterial = doc.componentdefinition.material.name
歯周病 = 丸い(doc.componentdefinition.thickness.value/2.54,4) '変換 cm に インチ
ゲージパス = new_folder_path と "\" と 歯みと "&omaterial
'messagebox.show(gauge_path ) の一覧
お問い合わせ
my.computer.filesystem.createdirectory(ゲージパス)
キャッチ
エンドトライ
make_dxf(doc,oasmdoc,rev_level,sage_path,othickness,omaterial) を呼び出します。
キャッチ
エンドトライ
端 もし
次へ
msgbox("dxf の輸出完了","すべて完了しました")

エンドサブ

サブ make_dxf(ドキュメントとしてodoc、ドキュメントとしてasmdoc、文字列としてreve_l、文字列としてfile_location、文字列としての病率、文字列としてのomaterial)

bom = asmdoc.componentdefinition.bom として空白
obom.partsonlyviewenabled = true の
dim obomview as bomview = obom.bomviews.item(3)'bom のみパーツ

それぞれのobomrowをobomview の bomrow として使用します。 ログイン
dim rdoc ドキュメント = obomrow.componentdefinitions.item(1).document
rdoc.displayname = odoc.displayname の場合、

dim oqty として 整数 = obomrow.totalquantity

このアプリケーション.documents.open(odoc.fullfilename, true)

文字列 = odoc.displayname

dim rev_adder を文字列 = "" として
もし rev_l <> "" ならば、 rev_adder = " rev" と rev_l

文字列 = odoc.propertysets.item("デザイントラッキングプロパティ")item("在庫番号") バリュー

ファイル名を文字列 = file_location & "\" & "mark_" & "-" & "-" & "-thk_" & "_in-qty_" & "_" & "_" & ".dxf"

'messagebox.show(ファイル名)

dim ocompdef として 板金成分定義 = odoc.componentdefinition

ocompdef.hasflatpattern = false の場合、
ocompdef.unfoldの
その他
ocompdef.flatpattern.edit は、
端 もし

odataio を dataio = odoc.componentdefinition.dataio とする
odataio.writedatatofile("フラット パターン dxf?acadversion=r12&rebasegeometry=true&simplifyspline=true&interiorprofileslayer=iv_interior_profiles&invisiblelayers=_tangent;iv_bend;iv_bend_down;iv_tool_center_down;iv_arc_center_down;iv_feature_profiles&invisiblelayersiv_feature_feature_feature_feature_files=ja_factor_profilesiv_bend_bend_bend;iv_bend&v_all_all=true&s=true&de=true&defiles=true&s=true&defiles=true&de=true&de=true&de=true&de=true&de=true&defile=true&de=true&de=true&de=true&de=true&de=true&de=true&defile=true&detail=true&de=true&de=true&de=true&de

ocompdef.flatpattern.exitedit がリリースされました。
odoc.close ディレクティブ
出口のための
端 もし
次へ

エンドサブ
 
お問い合わせ

私は自分のニーズに合わせてコードを変更し、完璧に機能します。 お問い合わせ

私はあなたに何かを尋ねるつもりです:

ファイル名や名前の部分を自動で出力するシステムはありますか? フラットなパターンで穴の穴を避けることは不可能なミッションですが、まだ試してみるといいですね。 厚みのdxfsを分けることは不可能なようですが、どのように見せました。
 

Forum statistics

Threads
46,674
Messages
380,976
Members
2
Latest member
loop80
このフォーラムは、www.cad3d.it/forum1 - イタリアのデザインコミュニティの機械翻訳です。いくつかの用語は正しく翻訳されていません。

Members online

No members online now.
Back
Top