<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Inventor - 日本語フォーラムのトピックRe: iLogicからのエクセルファイル書込み</title>
    <link>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12764229#M369</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12085120"&gt;@masaya.sekido&lt;/a&gt;&amp;nbsp;さん&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Inventor2022の　APIを利用して、アセンブリ内の全部品から所定のカスタムプロパティ&lt;/P&gt;&lt;P&gt;を抜き出して、社内規定フォーマットのエクセルファイルに書き込み（貼り付け）たいと考えています。&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;まさに、その通りの事を以前はやっておりました。&lt;/P&gt;&lt;P&gt;Inventorから任意のカスタムプロパティを取り出して、Excelで編集し、元にもどす。といった運用です。&lt;/P&gt;&lt;P&gt;Excel VBA で InventorのApperentice API を使っていて、お客様には結構好評でした。&lt;/P&gt;&lt;P&gt;※ Apperentice を使わないと滅茶苦茶遅くなります。&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ただ、今、それをやるかというとやらないと思います。以下にその理由。&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;BOMのUI上でプロパティ編集ができるようになり、その方が便利になった事。&lt;/LI&gt;&lt;LI&gt;今更VBA？という空気。&lt;/LI&gt;&lt;LI&gt;使う人のPCの環境依存で動かないことが有った事。&lt;/LI&gt;&lt;LI&gt;VBA実行中、エラー処理 (On Error.. )が無視されるようになった事。&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;自分だったら、条件判断の処理をVB.NETで書いてクラスにしておき、iLogicからアドインで呼ぶ処理にすること思います。で、直接Excelに書くのでなく、やはり中間ファイルにすると思います。&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 May 2024 06:14:17 GMT</pubDate>
    <dc:creator>Octave.Lab</dc:creator>
    <dc:date>2024-05-10T06:14:17Z</dc:date>
    <item>
      <title>iLogicからのエクセルファイル書込み</title>
      <link>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12763907#M362</link>
      <description>&lt;P&gt;久しぶりの投稿になります。&lt;/P&gt;&lt;P&gt;Inventor2022の　APIを利用して、アセンブリ内の全部品から所定のカスタムプロパティ&lt;/P&gt;&lt;P&gt;を抜き出して、社内規定フォーマットのエクセルファイルに書き込み（貼り付け）たいと考えています。&lt;/P&gt;&lt;P&gt;（EXCELを直接操作するとタスクキルしないといけない問題もありますが）&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;その他案として、まだ自己調査すらしてないですがiLogic⇒EXCELという選択肢はありますか？？&lt;/P&gt;&lt;P&gt;OpenFIleDialog使えないので、とてもやり難そうですが。&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;部品表で出力も出来るんですが、融通が利かない部分もあり&lt;/P&gt;&lt;P&gt;（図番等、関数などでフィルタかけて所定の条件が整ったものだけ出力したいので）&lt;/P&gt;&lt;P&gt;カスタムしたいと考えています。&lt;/P&gt;&lt;P&gt;ご意見いただけますと助かります。&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 00:37:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12763907#M362</guid>
      <dc:creator>masaya.sekido</dc:creator>
      <dc:date>2024-05-10T00:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: iLogicからのエクセルファイル書込み</title>
      <link>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12763921#M363</link>
      <description>&lt;P&gt;私はInventor VBA⇒Excelでやったことがありますが、Excelの書式は手入力用に作られているケースが普通なので、それに完全に合わせようとするとエラー処理がかなり大変です。Excel書式側も自動化に歩み寄らないとかなり大変になります。先に値が入っていたりセルがずれていたり、設計変更前の値や誤った値が入っていた時の処理、それでエラーになったときにどこが問題だったか示すなど、エラー処理がコードの大半になってしまいました。。&lt;/P&gt;
&lt;P&gt;この手のプログラムはそんなに短くないので、デバッグ環境のあるVBAをおすすめします。&lt;BR /&gt;個人的には全自動ではなく半自動である程度人間が判断するフローの方がスムーズという感覚を持っています。たとえば、Excel書式にコピペしやすい中間形式を出力するとか、クリップボードに書き込むとか。&lt;/P&gt;
&lt;P&gt;ご参考まで。&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 00:54:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12763921#M363</guid>
      <dc:creator>ohta_akira</dc:creator>
      <dc:date>2024-05-10T00:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: iLogicからのエクセルファイル書込み</title>
      <link>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12763930#M364</link>
      <description>&lt;P&gt;いつもお世話になっております。&lt;/P&gt;&lt;P&gt;早速のご回答有難うございます。&lt;/P&gt;&lt;P&gt;やはりそうですよねぇ・・一旦Listに入れてから結合してクリップボードに貼り付けて進めていましたが、&lt;/P&gt;&lt;P&gt;人に頼らない自動化を目指す、ワンクリック作業、ということも一応検討しておりまして・・&lt;/P&gt;&lt;P&gt;どうしても無くせないところはありますよね。&lt;/P&gt;&lt;P&gt;中間ファイルなら　csv＋マクロなどが妥当ですかね。&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 01:00:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12763930#M364</guid>
      <dc:creator>masaya.sekido</dc:creator>
      <dc:date>2024-05-10T01:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: iLogicからのエクセルファイル書込み</title>
      <link>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12763938#M365</link>
      <description>&lt;P&gt;ちょっとシンプルな実行例ですが　ありました。私もやらないし、そのまま使える事ではないですが&lt;/P&gt;&lt;P&gt;皆様のご参考になれば。&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.cadlinecommunity.co.uk/hc/en-us/articles/7619656499357-Exporting-data-into-Excel-from-Inventor-using-iLogic" target="_blank" rel="noopener"&gt;Exporting data into Excel from Inventor using iLogic – Cadline Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 01:07:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12763938#M365</guid>
      <dc:creator>masaya.sekido</dc:creator>
      <dc:date>2024-05-10T01:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: iLogicからのエクセルファイル書込み</title>
      <link>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12763943#M366</link>
      <description>&lt;P&gt;社内規定フォーマットが変則的でないか、自動化に合わせてある程度フォーマットの修正が可能であれば、できれば全自動で転記できたらカッコイイですよね。&lt;/P&gt;
&lt;P&gt;何例かやった経験からすると、全自動は「かなり大変」です。&lt;/P&gt;
&lt;P&gt;でも決して不可能ではないので、その難易度感を参考に是非チャレンジしていただければと思います。&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 01:10:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12763943#M366</guid>
      <dc:creator>ohta_akira</dc:creator>
      <dc:date>2024-05-10T01:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: iLogicからのエクセルファイル書込み</title>
      <link>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12764029#M367</link>
      <description>&lt;P&gt;BOMに必要な情報が全てあるという前提で、以下のようなVBAをExcel側で実装すればどうでしょう。&lt;/P&gt;
&lt;P&gt;(私は、そうしています)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Inventorを遠隔操作して、BOMをCSVで保存する。&lt;/P&gt;
&lt;P&gt;2) ExcelでCSVを開き、成形する。&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;コードをInventor側とExcel側の2か所に分散させるのは悪手です。&lt;/P&gt;
&lt;P&gt;完全に片側に集約するか、それが無理なら汎用的かつ小さなコードだけ片側に残す実装にすると保守が楽。&lt;/P&gt;
&lt;P&gt;どうしても両側にそれなりのコードが必要なら、きちんとクライアント - サーバーの概念を持ち込んで検討しないと、収拾がつかなくなりそうで危険。&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 02:49:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12764029#M367</guid>
      <dc:creator>HideoYamada</dc:creator>
      <dc:date>2024-05-10T02:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: iLogicからのエクセルファイル書込み</title>
      <link>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12764036#M368</link>
      <description>&lt;P&gt;いつもお世話になっております。&lt;/P&gt;&lt;P&gt;やったことは無いですが　EXCEL側からという手がありましたね。&lt;/P&gt;&lt;P&gt;タスクのゴミ問題もないし。&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;最近VBAは避けていますが、検討してみます。&lt;/P&gt;&lt;P&gt;有難うございます。&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 02:56:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12764036#M368</guid>
      <dc:creator>masaya.sekido</dc:creator>
      <dc:date>2024-05-10T02:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: iLogicからのエクセルファイル書込み</title>
      <link>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12764229#M369</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12085120"&gt;@masaya.sekido&lt;/a&gt;&amp;nbsp;さん&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Inventor2022の　APIを利用して、アセンブリ内の全部品から所定のカスタムプロパティ&lt;/P&gt;&lt;P&gt;を抜き出して、社内規定フォーマットのエクセルファイルに書き込み（貼り付け）たいと考えています。&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;まさに、その通りの事を以前はやっておりました。&lt;/P&gt;&lt;P&gt;Inventorから任意のカスタムプロパティを取り出して、Excelで編集し、元にもどす。といった運用です。&lt;/P&gt;&lt;P&gt;Excel VBA で InventorのApperentice API を使っていて、お客様には結構好評でした。&lt;/P&gt;&lt;P&gt;※ Apperentice を使わないと滅茶苦茶遅くなります。&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ただ、今、それをやるかというとやらないと思います。以下にその理由。&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;BOMのUI上でプロパティ編集ができるようになり、その方が便利になった事。&lt;/LI&gt;&lt;LI&gt;今更VBA？という空気。&lt;/LI&gt;&lt;LI&gt;使う人のPCの環境依存で動かないことが有った事。&lt;/LI&gt;&lt;LI&gt;VBA実行中、エラー処理 (On Error.. )が無視されるようになった事。&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;自分だったら、条件判断の処理をVB.NETで書いてクラスにしておき、iLogicからアドインで呼ぶ処理にすること思います。で、直接Excelに書くのでなく、やはり中間ファイルにすると思います。&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 06:14:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12764229#M369</guid>
      <dc:creator>Octave.Lab</dc:creator>
      <dc:date>2024-05-10T06:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: iLogicからのエクセルファイル書込み</title>
      <link>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12764253#M370</link>
      <description>&lt;P&gt;いつも大変お世話になっております。&lt;/P&gt;&lt;P&gt;ご回答有難うございます。&lt;/P&gt;&lt;P&gt;うーーんVBAかぁ・・もう忘れちゃったんだけど、というのが正直私もありまして・・。&lt;/P&gt;&lt;P&gt;VBAレガシーにするなら、もう少しiLogicの環境が整ったら完璧なんだけどなぁ・・とも。&lt;/P&gt;&lt;P&gt;（私は2022からの導入でしたので　VBAはエクセルくらいでした使ったことなく）&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;こんなに複数の方々に回答いただけるとは思いませんでした。&lt;/P&gt;&lt;P&gt;直接EXCELは出来るんですけど、結構大変だし推奨されないんですよね・・・&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;結局クリップボードになるかもしれませんが　&lt;/P&gt;&lt;P&gt;（コーディングは　.netで行っております。）&lt;/P&gt;&lt;P&gt;全てのご回答が参考になりました。ありがとうございました。&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 06:30:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12764253#M370</guid>
      <dc:creator>masaya.sekido</dc:creator>
      <dc:date>2024-05-10T06:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: iLogicからのエクセルファイル書込み</title>
      <link>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12764696#M371</link>
      <description>&lt;P&gt;iLogicではなくて、VisualStudioで.netが出来るんなら、そこに統一すると良いかも。&lt;/P&gt;
&lt;P&gt;実行中のInventorのprocessを捕まえることができます。&lt;/P&gt;
&lt;P&gt;NetFrameworkだと簡単だけど、NETなら一手間が必要。(ググったら出てきます)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Excelを外部から操作するのは、メモリーリーク云々があるから、気を使いますね。&lt;/P&gt;
&lt;P&gt;それも、VisualStudioが使えるのならnugetでClosedXMLを入れると、Excel無しでワークブックを操作できますよ。&lt;/P&gt;
&lt;P&gt;ちょうど、そんなコードを書いていました。&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;public static List&amp;lt;RenameResult&amp;gt; CollectChangeForRename(string workbookPath)
{
    using var workbook = new XLWorkbook(workbookPath);
    var worksheet = workbook.Worksheet(1);
    int rowIndex = RowIndex.DataAreaTop;
    List&amp;lt;RenameResult&amp;gt; RenameResults = [];
    while (true)
    {
        var row = worksheet.Row(rowIndex);
        if (row.Cell(ColumnIndex.OldFolderPath).Value.IsBlank)
        {
            break;
        }
        var newBaseName = row.Cell(ColumnIndex.NewBaseName).Value.ToString().Trim();

// 以下略&lt;/LI-CODE&gt;
&lt;P&gt;こんな感じで、ワークシートを直接操作して保存できます。&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 11:35:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-ri-ben-yuforamu/ilogickaranoekuserufairu-shu-yumi/m-p/12764696#M371</guid>
      <dc:creator>HideoYamada</dc:creator>
      <dc:date>2024-05-10T11:35:37Z</dc:date>
    </item>
  </channel>
</rss>

