+ Reply to Thread
Results 1 to 1 of 1
  1. #1
    Forum Deity SEANT's Avatar
    AutoCAD 2014
    Join Date
    Aug 2005
    Rhode Island

    Default Re-Associate WCS/Orthographic Views

    Registered forum members do not see this ad.




    This situation is becoming more prevalent so I'm posting a fix here. Even though the problem is cropping up more often, I don't see this routine needing to be run more than once or twice in any CAD users career.
    In light of that, I'm not wasting time with bundling this as an addin - it shall remain simply as a NETLOAD to run DLL. For those nervous about pre-compiled code, see the source below.
    And, as you can see from the source, the simplicity of the code does not deserve the special treatment of Autodesk's Bundle system.

    The compiled code is compatible with AutoCAD 2016 - 2018, though it may run on versions prior. More than likely, the unzipped file will need to be UnBlocked before it will run:

    More than likely, the DLL will need to be on the users system, preferably in the Support File Search Path.

    // (C) Copyright 2017 by Sean Tessier
    using System;
    using Autodesk.AutoCAD.Runtime;
    using Autodesk.AutoCAD.ApplicationServices;
    using Autodesk.AutoCAD.DatabaseServices;
    using Autodesk.AutoCAD.Geometry;
    using Autodesk.AutoCAD.EditorInput;
    [assembly: CommandClass(typeof(STSC_ReAssociateViews.STSCCommands))]
    namespace STSC_ReAssociateViews
        public class STSCCommands
            [CommandMethod("STSCGroup", "ReAssociateViews", "RAV", CommandFlags.Modal)]
            public void OpInit()
                Document doc = Application.DocumentManager.MdiActiveDocument;
                Database Db = doc.Database;
                using (Transaction acTrans = Db.TransactionManager.StartTransaction())
                    Db.SetWorldUcsBaseOrigin(new Point3d(), OrthographicView.TopView);
                    Db.SetWorldUcsBaseOrigin(new Point3d(), OrthographicView.BottomView);
                    Db.SetWorldUcsBaseOrigin(new Point3d(), OrthographicView.FrontView);
                    Db.SetWorldUcsBaseOrigin(new Point3d(), OrthographicView.BackView);
                    Db.SetWorldUcsBaseOrigin(new Point3d(), OrthographicView.RightView);
                    Db.SetWorldUcsBaseOrigin(new Point3d(), OrthographicView.LeftView);
    Attached Files
    Last edited by SEANT; 31st Dec 2017 at 01:41 pm. Reason: Added Commit

Similar Threads

  1. Isometric drawing given two orthographic views
    By Thando in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 9
    Last Post: 6th Nov 2017, 04:52 pm
  2. Dimension Re-Associate
    By nicolas in forum AutoCAD Beginners' Area
    Replies: 4
    Last Post: 23rd Jan 2012, 03:56 pm
  3. orthographic views - bottom view wrong!
    By geoffalan in forum AutoCAD Drawing Management & Output
    Replies: 3
    Last Post: 3rd Nov 2009, 02:56 pm


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts