DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Importing wmf files.

Started by eherbert, May 18, 2016, 03:49:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

eherbert

I am learning LT Spice. 

With my old Spice program (ICAP/4) I had little trouble importing oscillographs into DesignCAD.  They looked awful, but were easy enough to edit to look good for publishing.

LT Spice has a tool to export the trace as a wmf file, and DesignCAD supposedly will import them.  However, every time I try, I get a Command Failed error message.

The files import into MS Word OK, so they are not totally corrupted.

A surprising thing was discovered almost by accident.  Some files, put in Word first (Insert-Picture) can then be copied and pasted into DesignCAD successfully.  Each trace is a separate vector, as are the coordinates and text.  I can edit at will, including changing fonts and size, just as I want it to.  So something works right sometimes in a peculiar way.

However, most of the time when I try this, it crashes DesignCAD.  I get the DesignCAD has stopped working and windows will close the program message.

Representative wmfs are attached.  The second one (PWL test 160518.wmf) I cold import using the insert-picture, copy, paste routine.  The second one (Sym 1 160507.wmf crashes DesignCAD.

I could not upload wmf files, so I am trying zipping them.

Of course, I would like to get the direct import to work.  I could live with the two step process if I could make it reliable.

Any ideas?

Ed

Bob P

I was able to open the wmf file in Irfanview, then copy from there and paste the image into DC.

eherbert

Thank you.  What is "Irfanview"?

Once pasted, is it vectors or an image?  I want vectors.  It's easy to test, see if you can select an move one trace.

Pasting from Word gave me vectors, when it worked.  Usually, it crashed DesignCAD 25.

Bob P

http://www.irfanview.com/

Unfortunately, the image from irfanview is not imported as vector entities.

Rob S

Agreed, the direct import of PWLtest....wmf results in "command failed for me also.

Best method I found so far is to paste the wmf file into Microsoft word, select all, copy, and paste into DC

This results in  a vector file in DC, and so far does not crash for me using V26 (beta)

Pasting from Paint gives an image file only.
User since forever

eherbert

Rob,

Thank you.

Are you able to paste circuit diagrams and get a vector drawing?  If so, maybe the advantage is V26.  Image file is not so bad for the schematics.

Here are a few things that I have found out, some tentative.

Crashing may be from very big files.  I have noticed that simpler circuits result in waveforms that can be pasted from Word.

I will be experimenting with ltsputil.exe for the big simulations, as one of its capabilities is making the time steps constant.  It's been a long time since I worked with DOS-like programs (command line with operatives), so I need to figure that out.

I did not try individual insert-pictures and select-all.  Worth a try. 

I can export cvs files and load them with import xyz, but it is cumbersome.  I used to do some BasicCAD programming.  That may be a solution.

Ed


samdavo

Sorry gents, I'm just trying to keep with the conversation - and failing badly lol.   I have found some wmf files on my computer, (I never use them otherwise :) ) and successfully imported one into a Word document (and I attach it for interest).   So where to now? I have tried to "select all" and import into DCAD V25, but all I get is a blank drawing.   

Rob. could you explain please what happens when you import this into V26 (and exactly what you do / did).  Cheers 

Rob S

If it was a vector-based wmf file in the first place, like the above-mentioned, then once you have it in word, and see the image, you select all, edit,copy go to designcad, and edit, paste.

This will not make a bitmap based wmf file into vector based drawing

Just to confirm, I will try this in V25, and make sure it works there as well

User since forever

Dr PR

Way back in early Windows (3.0) days, and perhaps in DOS days, any image you could get into Word would copy/paste into DesignCAD. This used to be my standard way to get DXF schematics into DesignCAD. If I could select and copy a vector image from any program it usually pasted into Word OK. Word keeps vector files as vectors, and often it cleans up imperfect vector drawings.

The other way around I could select and copy from DesignCAD into Word and then copy/paste from Word into other programs. This is how I used to incorporate corporate customer's logos into schematic drawings and PCB layout with several schematic/PCB drawing programs.

This does not always work in every version of Word and Windows. Every now and then Microsoft screws it up, and a version or two later it starts working again. I think it is a Windows function that Word and other programs use.

****

eherbert,

What version of DesignCAD are you using and what version of Windows? Are you using a 32 bit or 64 bit version of DesignCAD? How much RAM do you have in your machine?

The 32 bit version of DesignCAD are limited to file sized of about 250 Mbytes max. in a machine with 4 Gbytes RAM. In an old system with just 1 Gbyte RAM I had problems with files larger than about 60 Mbytes.

The 64 bit version of DesignCAD works with much larger files. I have worked with 650-700 Mbyte drawings on a Win 7 machine with 32 Gbytes RAM. In theory the file size limit should be terabytes, but for some reason 750 Mbytes seems to have been a limit with V24. I haven't pushed the later versions to see if I can create >750 Mbyte files.

Phil
DesignCAD user since 1987

eherbert

PR,

Thank you, that is very useful information.

I am using DesignCAD 25.2-64, Win7-Pro 64, Word 2013, 8 core AMD uP, 32 G RAM.  I have used just about every version of DesignCAD since it was ProDesign II.  Though it's been in my arsenal forever, I don't use it regularly and I have not learned it in any great depth.  Once I was pretty good at BasicCAD, but that was long ago. 

I suspect, but have not verified, that the copy and pastes from Word that crash DesignCAD may be vector files that are just too large even for the above.  I admit to being distracted by "real work."  Learning LT Spice is an extra curricular activity.  However, often I run SPICE simulations with a partial objective of producing good looking wave-forms to put in documents, so solving this problem (or discovering good alternatives) is important to me.

I have long used DesignCAD to edit and clean-up SPICE imports, but my old SPICE program, ICAP/4, is getting old because I won't pay the huge price to update it and keep my tech support current.  From all accounts, LT Spice is better, but the learning curve is steep for me.

Apparently DesignCAD does not know why the wmf import is not working and they don't have anyone on staff who knows wmf well enough to de-bug it.  So the Word document copy and paste bridge may be the only way that works for us.  LT Spice is a freebie from Linear Technology, so we don't even have the "I paid for it, it should work" persuasive power that one might expect with DesignCAD. 

If I knew that the wmf import worked with good files, and the LT Spice format was flawed or non-standard, I could make a fuss on the LT Spice forum.  But as it is, I suspect that it is a DesignCAD bug.  If the wmf imports to word and then can be copied and pasted most of the time, it suggests that the content is good in the wmf file.

So, maybe I should make a fuss on this forum.  However, if hardly anybody uses wmf import, maybe a low priority is justified for a program that is such a good value otherwise.  Still, I would like to see it get some attention.  It might be a really easy fix if understood.  Maybe an edit to the wmf header, which is text.

Ed

Dr PR

eherbert,

I have used LT Spice quite a bit for circuit design and simulation. I used earlier spice programs and LT Spice is much better (the documentation leaves a lot to be desired). And you can't complain about the price!

I have tried to put the graphs into documents only occasionally, but I do think I have had some problems with really huge files. On very long simulations with very short sample periods you get enormous numbers of points - far more than necessary to just display the curves.

You might try running the simulation again with fewer samples/longer sample interval. If you are graphing multiple phenomena (voltage, current, temperature, etc.) you might try running the simulation multiple times with only one curve at a time, and then overlay them in DesignCAD. You might be able to use some of the point reduction tricks in DesignCAD ("Edit/Selection Edit/ Smooth Line by Point Reduction" or "Edit/Selection Edit/ Smooth Line by Slope Detection") to reduce the point count in each curve. Or sometimes I just open an empty layer and use gravity snap with the "Curve" function to draw a new curve that fits the original with fewer points. Then I erase the original curve to reduce file size.

Phil
DesignCAD user since 1987

Rob S

I imported a large 66kb wmf file directly into designcad successfully, much larger than your 9kb file as posted in your message above.

http://www.armsandbadges.com/sample.htm

This would lead me to believe it is a quirk of the particular wmf file, rather than of Designcad's import routine, and also this eliminates the file size as being the primary issue.

Also, however, I have just now tried pasting your larger file Sym 1 160517 from Word and it crashes V26 as well for me, so that too is unreliable.
User since forever

eherbert

The wmf files generated by LT Spice were HUGE, many hundred k, some even over 1M, so reducing them may be the key.  Apparently in difficult simulations, the step size can get very small, generating many, many points.

I think the answer will be to use ltsputil.exe, but I have not tried it yet.

It is a utility that works with the LT Spice .raw files.  It may take a while for me to get through this, but I will report back what I find.

One operator appears to reduce the file size by making the step time constant, presumably by discarding, or interpolating into one point, many points that are too close together.

It is not an official LT Spice utility, but it was written by one of the experts on their forum and can be found there.

Ed

eherbert

I found this in a forum on http://arstechnica.com/civis/viewtopic.php?t=318283

Powerpoint.

Import the WMF file into a blank slide using the Insert Picture function. It will appear as one big object.

Select the object, right-click and Grouping -> Ungroup. Powerpoint may prompt you to convert it to a Microsoft Draw Object, depending on your version of Office. Do this, and then Ungroup the new object.

The elements of the WMF file are now all separate objects that can be edited.

When you're done, you can export the slide as a WMF or any other graphics format you fancy.


It works, and will import into DesignCAD.  However, it produces a very low quality vector drawing and the font is way too small.
Select it, crl-i, select T, change font size.  That fixes that.  There is a background fill that can be selected and deleted.  Some vectors are broken up, they can be re-combined with B.

Not too bad, but not too good, either.



eherbert

I spent way too much time today trying to understand this problem, and spent some money, too.  Learned something for my efforts.

1.  Some good faqs on wmf here:http://www.companionsoftware.com/Support/Windows-Metafile-FAQ

2.  The wmf files from LT Spice are part of the problem.  They are quite large, and Companion Software tech support had this to say about a sample file that I sent.
"A metafile that's more than 100K or so is usually a sign that the generating program is not doing something optimally. For example, instead of generating one polyline with 1000 points, they generate 1000 individual line segments. Besides being very inefficient, it also causes editing problems such as you describe. This is exactly what is happening in the file you sent. --- "

3.  I bought their program, Metafile Companion ($29).  Maybe wasted money, but if an LT Spice wmf is opened in Metafile Companion and saved with a new name, it imports reliably into DesignCAD, with compromises.

Two problems:  It takes a large LT Spice wmf and makes it much larger.  Also, the vectors are broken into many, many small vectors, and the ends are not common, so that they cannot be joined (B).  They are faithful to the color, though, so you can go to options:layer and separate layers.  Then select the layers one at a time, deselect the reference designator text, and make the trace a group.  Or, you can lock all other layers and work on one at a time.

4.  I am quite sure that LT Spice does not use .raw data to generate the wmf.  I think that it is a screen capture.  It looks much better (but makes a much larger file) if full screen is used.

5.  The DesignCAD wmf import does not seem to mind very large files, see below.  That is not the problem.

6.  Despite a huge wmf, the DesignCAD file is much smaller.
LT Spice wmf  10.74 M.  (Yes, M)
Converted to CS wmf.  21.48 M
Resulting DesignCad file:  4.5 M.  Still, way too large for a single vector graph.

7.The most efficient conversion is the one described in an earlier post using power point.  Using the same LT Spice wmf file,
LT Spice wmf 10.74 M
PP converted wmf 509 k
Whoops! Big chunks of the graph are missing.  Oh, well, forget about that method.  Sure, try it, but is seems not to be reliable.

So, I guess that the best is to put the wmf into Word and paste it into DesignCAD IF IT WORKS!  It seems not to be reliable, and ALWAYS save your drawing first, because if it fails, it crashes DesignCAD  The Power Point conversion may be worth a try.  The Metafile Companion software seems to be the most reliable, with compromises.

Ed