Export IPT to DXF with iProperties in 'Drawing Properties'

Export IPT to DXF with iProperties in 'Drawing Properties'

cadman777
Advisor Advisor
923 Views
18 Replies
Message 1 of 19

Export IPT to DXF with iProperties in 'Drawing Properties'

cadman777
Advisor
Advisor

Hey Guys,

I'm trying to figure out how to make a  part's Custom iProperty values transfer into the exported DXF flatpattern's 'Drawing Properties'. The iProperties themselves transfer, but not all the values transfer, since some of them are empty when I open them in AutoCAD and look at the file's 'Drawing Properties'. Is there a setting in the INI file that controls that? Or is there some code I can use? Where can I find the info on this?

Any light shined on this is appreciated...

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
924 Views
18 Replies
Replies (18)
Message 2 of 19

Gabriel_Watson
Mentor
Mentor

I was comparing to another INI we have here for AutoCAD DWG export:

 

Galaxybane_0-1640927841373.png

 

So you can probably use that format. Add the "[EXPORT PROPERTIES] line then list SELECTED PROPERTIES = whatever you would like. The problem seems to be what are those codes following each one, which look like registry entries... I am not sure. I hope this adds one more piece to the puzzle, good luck.

P.S.: a good overall guide to these INI files below (no codes for properties though).
https://doc.coolorange.com/projects/coolorange-powerjobsprocessordocs/en/stable/jobprocessor/code_re...

0 Likes
Message 3 of 19

cadman777
Advisor
Advisor

Thanx for this info!

It helps affirm what I already figured out for myself about the UI and ini file.

It does it in a graphical format, which is much easier to digest than pages of useless words.

However, it doesn't tell me what I need to know to do what I want to do.

So it helps, but not enough. 😐

Thanx.

 

I was hoping to find something along the lines of what I have in my AutoCAD R13 'Customization' manual (a paperback book in a set of books). One would think that all the Inventor codes would be explained for all this stuff so we end-users would be able to do what we need to do without much help from outside sources. The thing that's so disgusting is, Inventor is a half-arsed app, so we need to use iLogic/VBA/VB.Net/C#/etc. to make it do what we want it to do. YET, when we WASTE all that time learning those things that are not part of our normal job, we find we ram into concrete walls with lack of or hidden information. This is nothing short of a psychological war by Autodesk against their own customers. In the real world, WHO BITES THE HAND THAT FEEDS THEM?

 

As for my original post above, the problem I have is that no all the VALUES of the iProperties transfer into the DXF file's 'Drawing Properties', as seen when viewed in AutoCAD. So WHY that happens, and HOW to fix it is what I originally was hoping to get an answer on.

 

It appears that this DXF translate/export has been neglected for well over a decade by the Autodesk Inventor developers. This should be a no-brainer, considering all the people who use Inventor flatpatterns in their plate/sheetmetal processing machines where DXF is THE industry standard for file input into those machines. The Inventor DXF export ini file should have settings for every possible basic need, such as transferring iProperties to the 'Drawing Properties'; cleaning up the perimeter profile and joining it together (or not); optional labels for bend lines, identifying info, part specs, etc.; option to use holes as OD, TapDrill or sketch point; assignment of layers and colors to entities; etching control; so forth and so on. And it all should be well documented in an easy to assimilate fashion so it can be easily found and used when needed.

 

Thanx for giving me something else to rant about in this age of soft-revolutions!

 

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
Message 4 of 19

Gabriel_Watson
Mentor
Mentor
I understand the frustration first-hand, but when comparing prices with other software out there, this is what we get for a cheaper one. It's not so bad if we understand the limitations of the tools we are working with. I think the biggest issue with Autodesk is how it's falsely claiming more functionality such as "easy" or "seamless" interaction between Fusion and Incentor, Revit and Inventor, and so on. Every translation such as to DXF or from point clouds, or interaction with other applications is not fully mapped or hands-free.

About this topic of DXF, I guess I would seek out someone who could code for you an export plugin for Vault (if you use Vault), so that you could leverage job processors to run the task and included in that task could be any sort of API-coded function to externally copy the values to make sure they arrive at the final destination.
That's the price we pay for a cheaper design tool. It's a muscle car, not a Tesla.
0 Likes
Message 5 of 19

cadman777
Advisor
Advisor

Thanx for your opinion.

 

The fact remains, McNeel wrote exporters for Rhino3d for almost every kind of CAD file. They work marvelously, like Autodesk's sofware should (but doesn't). Rhino3d is extremely cheap compared to Inventor. Your argument in favor of Autodesk's refusal to do their job is...well, let's say it's 'no argument' and leave it at that.

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
Message 6 of 19

A.Acheson
Mentor
Mentor

Is this the iProperties you are looking for? This is found under Drawing Utilities Drawing Properties in Autocad.

AAcheson_0-1640992114203.png

 

These iproperties only show up if the Inventor  .dwg file is exported to .dxf. These are only iproperties of the drawing so if these have not been transferred to the drawing from the .ipt then those will be missing. 

AAcheson_1-1640992574287.png

 

 

If this is different than you need can you post a few screenshots of the workflow you are using. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 7 of 19

cadman777
Advisor
Advisor

Hi Alan,

Thanx for the info.

Yes, those are the properties in AutoCAD that I'm looking at.

I was unaware that I had to transfer all the properties from the IPT to the IDW and then from the IDW to the DXF.

If that's correct, then how do you get those properties to the DXF if you're exporting the IPT flatpattern to DXF without using a intermediate IDW?

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
Message 8 of 19

A.Acheson
Mentor
Mentor

The short answer is I don't think you can. Creating a dxf from the flat pattern by either exporting face manually or using dataIO has no opportunity to export iproperties. It looks like these have to be stored in the drawing as you are accessing them through drawing utilities in Autocad. I do not use any of this functionality so there maybe work arounds out there. 

 

Here is the VBA method to save as from DWG to DXF

https://help.autodesk.com/view/INVNTOR/2021/ENU/?guid=GUID-12B9A89D-7233-4529-A69A-271BA2038670

 

Here is the VBA method to save as from Flat Pattern to DXF, note the argument options do not include iproperties

https://help.autodesk.com/view/INVNTOR/2021/ENU/?guid=GUID-9F5075D3-00C5-47B3-8BF9-F97E8680B39E

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 9 of 19

cadman777
Advisor
Advisor

Hi Alan,

 

Thanx for the tip and for the links. I really need to start using the online API Sample Programs. Thing that keeps me from doing it is I'm still not yet using VBA b/c iLogic seems to be working good enough and is much easier to learn than VBA. Maybe I'll get in enough iLogic to feel confident enough in using VBA? Anyway, every time I try to convert an iLogic rule to a VBA macro I get stuck, usually on a VBA syntax thing that I don't know how to find info on. Plus, being offline doesn't help. So everything I do is manual, back and forth over and over again.

 

Interesting that I already have a rule that I'm working on based on the 2nd link you provided. I converted it to iLogic in a SaveCopyAs rule. Then I have other rules that I combine with it in a VBA macro to runs all the rules consecutively. Works pretty good, but not good enough. That's my hack method of combining rules to accomplish a task that requies a LOT of coding that I don't know how to do yet.

 

With this rule I'm trying to automate every aspect of making my DXFs, so they can be instantly imported into burning software for various CNC machines. Some of the things I'm trying to do are not working so well. The reason is b/c I'm guessing on how to do certain things, such as the Options, and comparatively what works with the Translator Add-in vs. the SaveCopyAs function.

 

An example is, how do I make all the profiles polylines using the ini file with the SaveCopyAs method of export?

And what is the syntax of creating layers, and how do I put various line types and entities on their relevant layer?

This is the kind of thing I want to know.

Any idea where I can find it?

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
Message 10 of 19

A.Acheson
Mentor
Mentor

I do not use VBA for the reason you have mentioned, preferring to translate everything to work in the ilogic editor using VB>NET. Anything I cannot translate I will leave as VBA and just trigger the macro through ilogic. 

Drawing to DXF creation.

Here is a link on how to manually set the .ini file. You can then create the dxf from the drawing using the save as method and the ini files will then be used to tailor the dxf file. It seems that exporting the face does not give the same options as performing the save as on the flat pattern. once the ini file is then configured

Flat Pattern to DXF creation:

Using the DataIO object direct from the flat pattern you would need to build up the options manually but if you can successfully do this you do not need a drawing file. 

AAcheson_0-1641258316148.png

 

This example Merges the Profiles Into a Polyline

 

Sub Main
	
	ExportFlatPattern
End Sub

Sub ExportFlatPattern
    ' Get the active document.  This assumes it is a part document.
    Dim oDoc As PartDocument
   oDoc = ThisApplication.ActiveDocument

    ' Get the DataIO object.
    Dim oDataIO As DataIO
   oDataIO = oDoc.ComponentDefinition.DataIO


    ' Build the String that defines the format Of the DXF file.
    Dim sOut As String
    sOut = "FLAT PATTERN DXF?AcadVersion=2000&OuterProfileLayer=IV_INTERIOR_PROFILES&MergeProfilesIntoPolyline=False"

    ' Create the DXF File.
    oDataIO.WriteDataToFile(sOut, "C:\flatpattern.dxf")'Change output location here

End Sub

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 11 of 19

cadman777
Advisor
Advisor

Thanx for this excellent info! I never would have dug this up in my wildest imagination.

 

Don't get me wrong, I do know about all of it. The thing I didn't know about is if I configure the DXF export settings in the SaveCopyAs dialogue, and save them, they will be used anywhere in Inventor when an export to DXF is done.

 

The MFG web site is very well done as a visual, which says way more to me than text, as in the Samples link.

However, I did get more out of the Samples link this time around with respect to some syntax.

 

Let me work on this a bit and see how it goes.

 

Incidentally, thanx for the affirmation about VBA vs. iLogic.

Nice to know someone else thinks like I do instead of like a 'coder'!

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
Message 12 of 19

cadman777
Advisor
Advisor

OK, I did a SaveCopyAs on an IPT flatpattern, and in the process set up the options and saved the INI file.

Then I did a SaveCopyAs on an IDW flatpattern and attempted to use the INI file from the previous operation.

The result was an error ''invalid ini file format', which means that the ini files are not interchangable/compatible btw the two DXF processes. So apparently the IPT translator vs. the IDW doesn't use the same ini file. So now I'm back to square 1 on this.

 

So I ask the same question: Where can I find the secret syntax to add to the IDW>DXF ini file that allows me to (for example) make all the profiles into joined polylines?

 

Here's a screenshot of my ini file:

cadman777_1-1641319239350.jpeg

I already get that the xml file controls layers and layer properties.

@Gabriel_Watson already gave me info on many of the Options.

But some of them are missing, and they may be useful.

Any idea where I can find a line-by-line explanation of the above ini file (the 'line type & line scale' section is self-explanatory) that shows all the options and what they do?

This sure seems to me like another Autodesk case of THE EMPEROR HAS NO CLOTHS, and nobody's saying anything about it.

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
Message 13 of 19

cadman777
Advisor
Advisor

One thing I just remembered and verified that I forgot to mention is this:
I made an IDW template containing all the iProperties that I wanted in the DXF file.

Some of the iProperties had default values.

So now I see that all those iProperties did transfer BECAUSE OF their pre-presence in the IDW file.

And all the iProperties in that IDW file transferred over as well.

So that means none of the iProperties will transfer directly from the IPT file to the IDW file without coding.

So that's what I'm going to do next.

But I'm going to use it with an IDW file containing no DXF iProperties.

That way I can see if my iLogic rule 'iProps_from_IPT_to_IDW' works.

That may be the answer to one of my problems.

But at this point, I'm beginning to believe, based on all that I've see thus far, that there is no setting in the IDW SaveCopyAs to join all the profile lines together, which is angering.  😡

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
Message 14 of 19

Gabriel_Watson
Mentor
Mentor

Relax: https://youtu.be/tybOi4hjZFQ

And do let us know if you find a solution for this. As I said I believe you'll end up having an add-in (since there is no easy iLogic trigger for the export) to copy the values onto the new DXF file.

0 Likes
Message 15 of 19

cadman777
Advisor
Advisor

It's like I've been saying for over 20 years of using Autodesk products. Whenever I need to go deeper than the surface of the product, IT FAILS ME. In other words, when I take the time to dig into the software for a solution, I ALWAYS discover it ends in a 'wild goose chase' resulting in lost time and money that nobody pays me for. There is no forgiveness for that, so there will be no 'relaxing', only negative thoughts against the 'perps' involved.

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
Message 16 of 19

A.Acheson
Mentor
Mentor

I had another attempt at this and wasn't able to get the inventor ini file launched from the flatpattern to be compatible with the dxf export from the drawing. My thoughts are they are not interchangeable and maybe that is obvious but worth a shot exploring. 

 

So I think the options for ilogic are to build out the dataIO method and do without the iproperties. Or to work with the Autocad. Ini file and do without the MergeProfilesIntoPolyline and gain the iproperties.

 

Manually there is still the  method to use the inventor.ini file manually from the .ipt file. 

 

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 17 of 19

cadman777
Advisor
Advisor

Alan,

Thanx for doing your tests.

I already did those tests and came to the same conclusion.

Hence my above comments.

The approach I'm going to try next is try to write a rule that takes the iProperties and their values out of the IPT and transfer them into the IDW file, then write a LISP routine that will process all the DXF files by joining all the lines. It should be easy.  I can probably do it with the simple COMMAND function.

Otherwise, I'll have to go back to the drawing board and export all the fp's from the IPT file, then do the rest of it the same way for the iProperties. Not sure just yet how to approach that clusterf**k of a process.

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
Message 18 of 19

johnsonshiue
Community Manager
Community Manager

Hi Folks,

 

Indeed, it does not seem that there is an out-of-box solution to accommodate the DXF property export request. I did a quick search on Inventor App store. Here is an app to export some properties to DXF if not all.

 

https://apps.autodesk.com/INVNTOR/en/Detail/Index?id=7498862835390395853&appLang=en&os=Win64

 

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 19 of 19

cadman777
Advisor
Advisor

Thanx Johnson, I'll check into it.

One would think that after all these years of sheetmetal fabrication and the gazillion file transfers of DXF files to burning machines...

Update: Sadly, my Inventor is too old for that add-on.  ☹️

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes