Saturday, April 6, 2024

Why Prefix a Command in AutoCAD With a Hyphen?

You are probably all familiar with the XLIST command, one of the Express Tools available with Autodesk® AutoCAD® and its verticals (but may not be available in AutoCAD LT®). This post explains why you might want to prefix that command with a hyphen.

The XLIST command.

The XLIST command reports properties of a nested object, such as the layer and linetype of a polyline within a block or an xreference drawing. This command is useful in identifying the layer and xref hosting a specific object. The command launches a small dialog to display the query results, as shown in Figure 1. 

The Xref/Block Nested Object List dialog.
Figure 1: The Xref/Block Nested Object List dialog. 

Based on the layer value in the dialog, the object is a polyline in an xreference drawing named x00000_p-site on a layer named cs-esmt-line. 

NOTE: The vertical bar in the layer value separates the xreference name from the layer name.

In the previous example, the layer name is completely visible within the dialog. Since the dialog can't be resized, if the xref name + layer name is too long, it might extend past the edge of the dialog, as shown in Figure 2.

A layer property value that extends past the edge of the Xref/Block Nested object List dialog.
Figure 2: A layer property value that extends past the edge of the dialog. 

Hyphens to the rescue!

Some commands allow a hyphen as a prefix, and XLIST is one. With the hyphen prefix, the command outputs the query results in the command line instead of the dialog. The result of running the -XLIST command on the same object is shown in Figure 3.

The command line result of the -XLIST query.
Figure 3: The command line result of the -XLIST query.

The query results in the command line show the full xreference name and the full layer name. As a bonus feature, you can copy the layer value to the clipboard and paste it into the layer palette filter of another drawing.

More Examples?

Another example of when to add a hyphen prefix is with the PURGE command. By running the command with the hyphen prefix, you can access the option to purge registered applications (Regapps), as shown in Figure 4.

The command line options for the -PURGE command.
Figure 4: The command line options for the -PURGE command.

For Civil 3D® users, multiple commands can be run in multiple drawings by creating a script file and using the Autodesk Batch Save Utility. It does a lot more than just saving files! Using -LAYER you can create and modify layer properties directly from the command line. These commands can then be converted into programmable pieces for scripts or LISP routines.

  • (command "-LAYER" "ON" "G-ANNO-TTBL" "THAW" "G-ANNO-TTBL" "")
  • (command "-LAYER" "MAKE" "G-ANNO-SEAL" "")
Note that some commands, such as -LINETYPE, might begin in command line only mode, but once a dialog such as "file open" is launched, the command is no longer command-line only.  Details of that process will not be covered in this post.

I hope you find this information useful.

--TomR





Wednesday, December 26, 2018

Update to Set Working Folder Dialog

Set Working Folder Uses File Open Style Dialog

A new feature of Civil 3D 2019 is an update to the Set Working Folder dialog. Previously it was strictly a browse and select folder dialog. As of Civil 3D 2019, the Set Working Folder dialog now resembles a File Open dialog.


This may seem like something small but for those of you that must drill multiple folders deep to select the Working Folder for a project, this new dialog is a nice improvement because now you can copy then paste a folder path from the Windows Explorer address bar into the Set Working Folder dialog address bar or Folder path.

Monday, December 3, 2018

Convert Survey Figures to Polylines

Sometimes survey figures are exactly what you want and other times you just want a polyline at elevation zero. If your like me, you created a figure style that flattens all elevations to zero then you exploded it. If that figure had an arcs, they became segmented like this:
I'm happy to report that there is a workflow to create these polylines with arcs from figures. I have confirmed that this workflow will work for versions 2016 through 2019. Note that the polylines will not update if the survey figure changes and is updated in the drawing.

Create a 2D figure style in your template

  1. In your template, expand the Toolspace > Settings tab > Survey > Figures category.
  2. Right click on Figure Styles and choose New.


  3. In the Figure Style dialog > Information tab, set the figure style name to 2D.


  4. In the Figure Style dialog > 3D Geometry tab, set the Figure display mode to Flatten figure to elevation and confirm that the Flatten figure to elevation is set to 0.00.


  5. In the Figure Style dialog > Display tab, change the layer, color, linetype, and so on to meet your CAD standards then click OK.
  6. Right click on the Toolspace > Settings tab > Survey category and choose Edit Feature Settings.


  7. In the Edit Feature Settings - Survey dialog, expand the Default Styles category and set the Default Figure Style to the 2D figure style you just created then click OK.


  8. Save and close the template.

Export Survey Figures to Polylines at Elevation Zero

  1. Begin a drawing with the template that contains the 2D figure style.
  2. Open a survey database and import figures to the drawing. The default style should be the 2D figure style.
  3. Set the UCS to World then save the drawing.
  4. In the application menu, select Export > Export Civil 3D Drawing.


      NOTE: Exploding figures using the 2D figure style will create polylines with segmented curves. That's why you'll need to use the Export Civil 3D Drawing command to get polylines with arcs.

  5. In the Export Autodesk Civil 3D Drawing dialog, choose the folder for the exported drawing then click Export.


  6. When the export is complete, click OK in the Export Status Dialog then Cancel in the Autodesk Civil 3D Drawing dialog.


  7. Open the exported drawing and confirm that the figures were exported to polylines at elevation zero.
  8. Select all the polylines representing exported figures and copy to the clipboard with a basepoint using SHIFT+CTRL+C and entering 0,0 as the base point.
  9. If you are replacing the figures in the original drawing, you can now delete them.
  10. In the original drawing, confirm that the UCS is set to World then use CTRL+V and enter 0,0 as the insertion point to paste the polylines into the correct location.
  11. Save the drawing.
An alternate workflow might be to have a separate template for importing just figures into a temp drawing so that you can export them and they will be on the correct layer. For this you'll need separate figure styles for each type of figure/layer combination you need. Then you can choose to import figures into the original base drawing onto the feature line or equivalent layer and have them displayed as a 3d object instead of a 2D object.

Monday, November 19, 2018

Set Your Site...On Feature Lines

When importing LandXML files into Civil 3D 2019, there's a new setting for Feature Lines:

Use this setting to select a site for the Feature Lines you are importing. You can select a site from the dropdown list or use the green pic icon to select a site in the drawing.

You can also assign a site independently for Alignments and Parcels if any exist in the LandXML file that is being imported.

Tuesday, June 26, 2018

A360 Desktop Retired

In case you didn't see the A360 Desktop Retirement - June 19th, 2018 post in May, 2018, you may not know why you are seeing an Autodesk software CER appear on your screen at startup.



What this means to you is that the content will still be in both locations, but content in your online A360 Drive account will no longer be synchronized with content in your local A360 Desktop folder.

Uninstall instructions for A360 Desktop can be found here:

How to remove A360 Desktop
https://knowledge.autodesk.com/support/autocad/learn-explore/caas/sfdcarticles/sfdcarticles/How-to-prevent-installation-of-Autodesk-360.html

If you're looking for a replacement for the A360 Desktop synchronization on your desktop there is some useful information about the difference between A360 Drive, A360, BIM360, and Fustion Team here:

HELP: The difference between A360 Drive and A360, BIM360 & Fusion Team
https://forums.autodesk.com/t5/a360-tips-tricks-tutorials/help-the-difference-between-a360-drive-and-a360-bim360-amp/td-p/6351698

Monday, July 17, 2017

Creating a Varying to Max Slope Subassembly in SAC

I recently worked on a project that had a very interesting design challenge. Even though a proposed profile had been designed, the left edge of the roadway lane should match existing grade unless the resulting cross slope was greater than 3% (or less than -3%).

I often use generic links and conditional subassemblies to tackle out of the ordinary design scenarios, but this one was a bit more challenging. It wasn't until a recent Civil Immersion post by Alan Gilbert named Finish Strong Friday: Solving for Unknowns with Subassembly Composer that I thought of this solution in Subassembly Composer.

I wouldn't tackle anything in Subassembly Composer without talking first the Queen of SAC, Kati Mercier. She confirmed that my idea would work and thankfully provided a few tips to get me going.

Let's get this party started!

Open Subassembly Composer and save the new subassembly as MaxSlopeLeftEOP.


Assign the Subassembly Name in the Packet Settings tab then save again. [You can add a description, help file, and image on this tab as well.]



On the Input/Output Parameters tab, create parameters with the values shown in the image. Set the Type before entering the Name of the parameter. [The PavementThickness parameter is used in the final version of the subassembly, but not a requirement at this point in the workflow.] 



On the Target Parameters tab, create parameters with the values shown in the image. Set the Type before entering the Name of the parameter.[The EOPOffsetRight parameter is used in the final version of the subassembly, but not a requirement at this point in the workflow.] 




Now that the parameters are all setup, you can begin building the geometry of the subassembly. First up is the start point. Note that I've included "CL" and "Crown" as Point Codes and set the Point Geometry Type to Delta X and Delta Y for this point.


Next we need to get the surface elevation at the left edge of the lane. Since this point will strictly be used for calculations, place an auxiliary point. This point will not be visible in the subassembly when it's used in a corridor. For this point, the geometry type will be set to Delta X on Surface. Use the LaneWidth input parameter as well as the TargetSurfaceLeft and EOPoffsetLeft target parameters to determine the horizontal and vertical position of this point. Make sure to uncheck the Add Link to From Point box on this point because we will add an auxiliary link instead of a regular geometry link in the next step.


Add an auxiliary link. Similar to an auxiliary point, this link will not be visible in the subassembly when it's used in a corridor. This link will be used strictly for calculating the potential slope of the lane.


Next we need to determine what the slope of the lane should be based on the initial calculated slope compared with the MaxCrossSlope input parameter. To do this, we'll create a variable to carry that value to the link that we later add to this subassembly. The variable type will be double. Although the initial value is not important, I prefer to assign it to the slope of the auxiliary link from the previous step as shown .



Now comes the tricky part: determining whether to use the calculated slope of the auxiliary link or to use the MaxCrossSlope from the input parameter. There are several ways to get this answer and I'm only showing one of them.

Begin by determining whether the slope of the auxiliary link (AL1) is greater than or equal to 0. Use a decision component to ask this question. It helps to label the True and False conditions when working with decision components.



The next step is to complete the Positive Slope side of this decision component. Now that we've determined the AL1 slope is positive, we need to determine if it's greater than the MaxCrossSlope input parameter. To do this we use another decision component.


All that's left to do for this decision component is set the variable value to the correct slope on each side. When you add the first Set Variable component to the left side of the decision component, it will typically default to the True (Max Slope) side.


When you add the second Set Variable component, it will be connected to the previous Set Variable Component. You will need to drag the connection point of the gray link to the False side of the second Decision component then set the variable value to AL1.slope.



Now that both results for this decision component have been assigned, we return to the first decision component to complete the false (negative value) side of that decision component. As we did on the other side of this decision component, we will begin with an additional decision component. This time we will test for the slope being less than the negative MaxCrossSlope input parameter. Don't forget to modify the connection points of the decision component gray link to match the image.



Assign the LaneSlopLeft variable on the true side of this Decision component. The difference on this side is that you'll use the negative MaxCrossSlope.


For the False side of the Decision component, use the AL1.slope value again.


Now that we have the LaneSlopeLeft variable determined, we need to add the rest of the components for this subassembly. Begin by adding another point with Type set to Slope and Delta X. The slope should be set to the LaneSlopeLeft variable and the width to EOPoffsetLeft. Add links to all four Set Variable statements then check the Add Link to From Point box in the P3 component. Don't forget to add point and line codes if needed for your design.


The subassembly works like this when the target surface is adjusted above and below the MaxCrossSlope threshold. I also show how the EOPoffset Left target affects the lane width.



From here you can add more points, links, and even shapes. Assign the slope of the right lane to be the negative value of LaneSlopeLeft (-LaneSlopeLeft) to get the following result.



In case you're wondering, Subassembly Composer is not version specific. I created this custom subassembly in version 2018 and imported the pkt file into Civil 3D 2016 for testing.

Even if this scenario doesn't match your design needs, hopefully it will spark an idea for you to spend some time creating custom subassemblies in Subassembly Composer just like Alan Gilbert's video did for me. Also be sure to subscribe to the Civil Immersion feed to see Tips for Tuesday, Finish Strong Friday, and other useful posts by Alan Gilbert, Jeff Bartels, and Jerry Bartels.

You can find more infrastructure related content at Infrastructure Reimagined. Get inspired today!

Infrastructure Reimagined




Friday, April 15, 2016

Are SHX Font Comments in PDFs a Problem for You?


Both AutoCAD 2016 and AutoCAD 2017 include improvements for working with PDFs in AutoCAD.



That means the popularity of vector PDFs will continue to grow. With or without layers, the ability to convert a PDF into CAD objects to edit and republish is a very useful process, but what if you open the PDF and move your cursor around the screen and see SHX text in comments like this?

If you want your SHX text to be converted to a comment in the PDF and you are using AutoCAD 2016, then you're in luck. If you don't want those comments created by default, just install AutoCAD 2016 Service Pack 1 and set the EPDFSHX system variable to 0 then publish to PDF.

There's an Autodesk Knowledge Network page describing the resolution to this issue.

Drawing text appears as Comments in a PDF created by AutoCAD 2016
https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/Drawing-text-appears-as-Comments-in-a-PDF-created-by-AutoCAD.html

Note that the setting should be 0 before you publish to PDF.

Tuesday, March 29, 2016

Updated Version of Screencast is Available

There is an updated version of the Autodesk Screencast. It was posted on March 29, 2016. You can download either the Windows or Mac version here.

https://knowledge.autodesk.com/search-result/caas/simplecontent/content/download-autodesk-screencast.html


If you have not yet tried the Autodesk Screencast recording software, you should download your free copy today. Autodesk Screencast records basic audio and video in almost any application as well as keystrokes and mouse clicks used during recordings in Autodesk products such as AutoCAD.


The Autodesk Screencast software also allows you to make some edits to the timeline such as removing a selected portion of the recording.



Once you've recorded and made adjustments to the timeline, you can post the recording on the Autodesk Knowledge Network.



The recordings you upload can be marked as private, public, or unlisted.



Read more about Autodesk Screencast here then search for other useful tips posted there as well. You can even subscribe to a user's Screencast account to get notified each time a new video or AKN is posted by that user.

What's your favorite new feature in AutoCAD 2017?

In case you haven't heard, AutoCAD 2017 is now available for download. Many websites are now posting the new features you'll find in this version. There's even a feature list comparing the last few versions of AutoCAD for you to review.



In case you want to learn about the new features in AutoCAD 2017, begin with the (1) Learn portion of the Start Tab. There's a (2) What's New video showing the latest and greatest new features in AutoCAD 2017. The (3) Getting Started Videos can help show you around the interface and help you start using the software. The (4) Learning Tips are useful for many disciplines and the right and left arrow buttons can be used to access additional tips. Finally there's an (5) Online Resources section with links to additional learning resources, such as The Hitchhiker's Guide to AutoCAD Basics.

 


You can also access Learning Videos in the Autodesk Desktop App.



If you initially decided not to migrate/import your settings from your previous version of AutoCAD, you can later access this newly updated feature using the Migrate From a Previous Release command in the Start Menu. You will need to close AutoCAD 2017 to run this command.


The new Migrate Custom Settings dialog is more user friendly than previous versions.


Centerlines and centermarks are new features for AutoCAD 2017 as well. They are dynamic, which means they move with the source objects as shown in this video.



There are more new features such as improved PDF import support and graphics enhancements including making arcs look like arcs instead of segmented arcs even during a move command. For now, though, I want to discuss one of my favorite improvements in AutoCAD 2017. You might not even notice it until I describe it to you.

In previous versions of AutoCAD, when you click the New Folder icon, you had to then select the folder and right click or select the folder twice, slowly, to edit the folder name.



In AutoCAD 2017, the folder name is highlighted by default upon creation. That means you can start typing a folder name immediately after clicking the New Folder icon.



Yes this is how it works in Windows Explorer, but now it works the same way in AutoCAD 2017.


That leads me to my initial question: What's your favorite new feature in AutoCAD 2017?



Monday, March 28, 2016

Point to Point Inverse in Civil 3D

I find that map commands in Civil 3D can be very useful for both land surveyors and civil engineering technical staff. The problem seems to be that many users don't know about these very useful commands.

Here's a question than I'm often asked by land surveyors:
Is there a point to point inverse in Civil 3D?

The answer to this question is YES!
CGSLIST + the 'PN transparent command.

CGSLIST

CGSLIST is located on the Analyze ribbon tab in the Inquiry panel.


BEFORE YOU BEGIN

The help information for this command doesn't mention vertical difference, but that information is included in the output for this command.


This command uses the settings for Angle, Distance, and Direction that are stored in the Ambient Settings of the current drawing. If you want the course (bearing) to be in N90°00'00"E format, open the Drawing Settings dialog, choose the Ambient Settings tab, change the Direction > Format setting to DD°MM'SS" and press OK. You can also change the precision for coordinates, distances, and more.


You should also expand the command line so that you can see at least five lines of the command line history.


My example begins with a drawing that contains two points that are exactly 10 feet apart horizontally and 5 feet apart vertically. This allows me to confirm the horizontal and vertical results of the command.

Using the CGSLIST Command

  1. After selecting the Analyze ribbon tab, locate the Inquiry panel and click on the List Slope (CGSLIST) icon.


  2. When prompted, type P and press enter to use the Points selection option. Selecting the Points option here only notifies the command that you want to select coordinate points, not Civil 3D cogo points, for the input data type. 
  3.  

    NOTE: The command line shows that _AeccCgSList is the command running. You can also access this command by typing CGSLIST at the command line and pressing enter. If you are using Map 3D, use MAPCGSLIST. All three commands work in Civil 3D version 2015 or later. 

  4. When prompted to select a starting point, type 'PN and press enter. This will tell the command that you will be entering Civil 3D cogo point numbers instead of selecting coordinate points by clicking on the screen.



  5. When prompted to enter a point number, enter the starting cogo point number then press enter.


  6. The coordinates of the cogo point will appear in the command line history. Now enter the next cogo point number for the ending point then press enter.


  7. This command reports horizontal distance and elevation difference. It also reports the point elevations along with the grade and slope between the points. Notice that the distance shown is a horizontal distance, not a slope distance which is the result reported when using the DISTANCE or MEASUREGEOM command.

Now...
Don't be fooled!

Even though the command shows that the 'PN transparent command is still running, the CGSLIST command has reverted to the original Select object or [Points] prompt. At this point you'll need to press ESC to exit the 'PN transparent command, type P then enter to return to the Points selection, and finally type 'PN and press enter to return to the 'PN transparent command.

If you want a command that repeats with the 'PN transparent command, record a macro. If you're interested in a follow-up blog describing how to create and use that macro, please let me know in the comments section of this posting.