ViewportMatchOrientation

Short description

🧭 ViewportMatchOrientation is an AutoCAD and Civil 3D AutoLISP utility for matching paper space viewport orientation. 🔄 It copies the TwistAngle from one viewport to another so layouts can share the same rotated view direction.

Command:

🚀 Main command: ViewportMatchOrientation
🧭 Select a source viewport, then select a target viewport, and the target receives the source TwistAngle.

Description:

🧭 ViewportMatchOrientation is an SEO-friendly AutoCAD viewport rotation utility for paper space layout coordination.
🔄 The command switches to paper space, prompts for a source viewport, reads its AcDbViewport TwistAngle, then applies that angle to a second selected viewport.
📐 This helps match north orientation, rotated plan views, layout sheet viewports, and Civil 3D plan production view directions.
🎯 The routine is useful when multiple layouts or detail viewports must share the same rotation without manually entering viewport twist values.

Helper function: (if any)​

🧩 ssget with Viewport filter selects exactly the source and target viewports.
🧩 vlax-ename->vla-object converts selected viewports to ActiveX objects.
🧩 vla-get-objectname verifies that the selected object is an AcDbViewport.
🧩 vlax-get reads the source TwistAngle property.
🧩 vlax-put-property writes the TwistAngle to the target viewport.

Functionalities:

✅ 🧭 Read viewport orientation from a selected source viewport.
✅ 🔄 Apply the same TwistAngle to another selected viewport.
✅ 📐 Standardize rotated plan views between layouts.
✅ 🖱️ Use simple two-click viewport selection.
✅ 🧰 Work directly in paper space for layout production tasks.

Result:

🎯 The result is a faster way to match viewport orientation in AutoCAD and Civil 3D drawings.
📐 Layout viewports can be aligned to the same rotated view direction without manual angle calculations.
✅ The command improves sheet consistency for plans, profiles, details, and north-oriented viewports.

Images, animations etc.

Pixel

XAML code:

<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:src="clr-namespace:Autodesk.Windows;assembly=AdWindows">
    
<src:RibbonToolTip x:Key="ViewportMatchOrientation">
<src:RibbonToolTip.ExpandedContent>
<StackPanel>
<TextBlock Background="AntiqueWhite" TextAlignment="Left">
<Bold>Function Syntax: ViewportMatchOrientation</Bold>
<LineBreak/>
<Bold>Version: 1.1 Date: 20.06.2026 6:38:56PM</Bold>
<LineBreak/>
<Hyperlink>WEB</Hyperlink>
<LineBreak/>



<Bold><Run Foreground="DodgerBlue">🚀 Command Name</Run></Bold><LineBreak/>
<Run Foreground="White">🧩 Type </Run><Bold><Run Foreground="Orange">ViewportMatchOrientation</Run></Bold><Run Foreground="White"> at the AutoCAD command line.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">🧭 SEO Optimized Description</Run></Bold><LineBreak/>
<Run Foreground="White">🧭 ViewportMatchOrientation is an SEO-friendly AutoCAD viewport rotation utility for paper space layout coordination.</Run><LineBreak/>
<Run Foreground="White">🔄 The command switches to paper space, prompts for a source viewport, reads its AcDbViewport TwistAngle, then applies that angle to a second selected viewport.</Run><LineBreak/>
<Run Foreground="White">📐 This helps match north orientation, rotated plan views, layout sheet viewports, and Civil 3D plan production view directions.</Run><LineBreak/>
<Run Foreground="White">🎯 The routine is useful when multiple layouts or detail viewports must share the same rotation without manually entering viewport twist values.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="LimeGreen">🧰 Main Workflow</Run></Bold><LineBreak/>
<Run Foreground="White">1️⃣ Run ViewportMatchOrientation from a layout.</Run><LineBreak/>
<Run Foreground="White">2️⃣ Select the source viewport that already has the correct rotation.</Run><LineBreak/>
<Run Foreground="White">3️⃣ Select the target viewport that must match that orientation.</Run><LineBreak/>
<Run Foreground="White">4️⃣ The target viewport receives the same TwistAngle.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="LimeGreen">✅ Functionalities</Run></Bold><LineBreak/>
<Run Foreground="White">✅ 🧭 Read viewport orientation from a selected source viewport.</Run><LineBreak/>
<Run Foreground="White">✅ 🔄 Apply the same TwistAngle to another selected viewport.</Run><LineBreak/>
<Run Foreground="White">✅ 📐 Standardize rotated plan views between layouts.</Run><LineBreak/>
<Run Foreground="White">✅ 🖱️ Use simple two-click viewport selection.</Run><LineBreak/>
<Run Foreground="White">✅ 🧰 Work directly in paper space for layout production tasks.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">🧩 Important Commands and Helper Functions</Run></Bold><LineBreak/>
<Run Foreground="White">🧩 ssget with Viewport filter selects exactly the source and target viewports.</Run><LineBreak/>
<Run Foreground="White">🧩 vlax-ename-&gt;vla-object converts selected viewports to ActiveX objects.</Run><LineBreak/>
<Run Foreground="White">🧩 vla-get-objectname verifies that the selected object is an AcDbViewport.</Run><LineBreak/>
<Run Foreground="White">🧩 vlax-get reads the source TwistAngle property.</Run><LineBreak/>
<Run Foreground="White">🧩 vlax-put-property writes the TwistAngle to the target viewport.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">🎯 Practical Result</Run></Bold><LineBreak/>
<Run Foreground="White">🎯 The result is a faster way to match viewport orientation in AutoCAD and Civil 3D drawings.</Run><LineBreak/>
<Run Foreground="White">📐 Layout viewports can be aligned to the same rotated view direction without manual angle calculations.</Run><LineBreak/>
<Run Foreground="White">✅ The command improves sheet consistency for plans, profiles, details, and north-oriented viewports.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DarkRed">⚠️ Important Notes</Run></Bold><LineBreak/>
<Run Foreground="White">⚠️ The routine expects valid paper space viewport selections.</Run><LineBreak/>
<Run Foreground="White">⚠️ It changes the target viewport TwistAngle but does not copy scale, layer overrides, or viewport lock state.</Run><LineBreak/>
<Run Foreground="White">⚠️ Save or test before applying orientation changes to production sheets.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="Yellow">🏷️ Tags</Run></Bold><LineBreak/>
<Run Foreground="Yellow">🏷️ AutoCAD, 🏷️ Civil 3D, 🏷️ AutoLISP, 🏷️ Visual LISP, 🏷️ Viewport, 🏷️ Paper Space, 🏷️ Viewport Rotation, 🏷️ TwistAngle, 🏷️ Layout Viewports, 🏷️ Match Orientation, 🏷️ Plan Rotation, 🏷️ CAD Automation, 🏷️ Viewport Tools</Run><LineBreak/>


</TextBlock>
            
<Grid>
<Image Source="PNG" Stretch="Uniform"/>
</Grid>

<Grid>
<MediaElement
 Source="GIF"
 Stretch="Uniform"
 Visibility="Visible"/>
 </Grid>

</StackPanel>
</src:RibbonToolTip.ExpandedContent>
</src:RibbonToolTip>
</ResourceDictionary>

Additional info:

Share this page: