Jump to content

Search the Community

Showing results for tags 'transformation'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Categories

  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 1 result

  1. Hi! First of all sorry for my poor english. I'm total beginner in AutoLISP, I work mostly with GIS software and data, but i have to manage the following problem. I've recieved a big DWG file which is containing around 30000 entities with various entity types and several layers. Everything is in a custom local coordinate system, and I have to transform it into an other coordinate system. I only have the transformation equations, so I create my first AutoLISP file based on codes I've found on this and other forums: (defun c:customtransform() (if (setq ss (ssget "_:L")) (repeat (setq i (sslength ss)) (setq entitylist (entget (ssname ss (setq i (1- i))))) (setq obj (ssname ss i)) (setq new nil) (repeat (setq j (length entitylist)) (if (= 10 (car (nth (setq j (1- j)) entitylist))) (progn (setq x (cadr (nth j entitylist)) y (caddr (nth j entitylist)) ) (setq y (+ (+ (+ 0 332134.109) (* 0.40008331 x)) (* 0.59595102 y))) (setq x (+ (+ (+ 0 1087.012) (* 0.59595102 x)) (* -0.40008331 y))) (setq new (cons (list 10 x y) new)) ) (setq new (cons (nth j entitylist) new)) ) ) (entdel obj) (entmake new) ) ) (princ) ) It mostly does what I want, but there are 3 problems: 1. It does not move objects with MLINE and REGION entity type. 2. It transforms only a part of the LINE and 3D FACE entities. For example: one node of a LINE entity moves into the new position and the other node remains in the original position, so the result is a long line, with one node in the correct position and one node in the old position. 3. It works perfectly with most of the TEXT entities, but there are some TEXTs that remain in their original positions, and I can't find out what is the difference between the "working" texts and the "non-working" texts. Any advice how to fix the problems mentioned above? Thanks for any help!
×
×
  • Create New...