Author Topic: wmf export & import  (Read 1551 times)

0 Members and 1 Guest are viewing this topic.

ProfWolfMan

  • Guest
wmf export & import
« on: March 15, 2012, 10:54:10 PM »
Hi all,

I am trying to extract 2d plan view of my 3d model.
It consists 3d solids , surfaces and 2d objects.

I achived this by below steps.
1) set plan view
2) export as wmf file
3) import using wmfin
Code: [Select]
************************************************************************************************
;;; 3D model to flattened objects
;;; implemented using WMF export and import
(defun c:flat ()
  ;;error handler
  (defun *error* (msg)
    (setvar "filedia" 1)
  )
  ;;initial settings
  (setvar "insunits" 0)
  (command "ucs" "w")
  (command "plan" "w")
  (setvar "filedia" 0)
  ;;export as a wmf
  (command "export" "c:\\test.wmf" (ssget "x") "")
  (command "erase" (ssget "x") "");removes original objects
  (command "wmfin" "c:\\test.wmf" (list 0 0 0) "1" "1" "0");inserts flattened drawing
  (command "explode" (entlast));explode inderted block
  (command "plan" "w");change view as 2d plan view
  (setvar "filedia" 1);resets file dialog box
)
************************************************************************************************

It is very simple. But inserted object is vary in basepoint & scale.
I keep 'insunits' & 'base'are same when export and import.

How export to wmf controls basepoint & scale?
Kindly guide me.

Thanks & Regards,
Ganesan m

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: wmf export & import
« Reply #1 on: March 16, 2012, 08:51:11 AM »
You might find it easier to use the 'FLATTEN' command (Express Tools), or maybe this by Joe Burke.