Whena .dwg file contains VBA macros, a Compound File Binary Format file (what I like to call an OLE file) is embedded inside the .dwg file. This OLE file contains the VBA macros. It's similar to .docm files, except that a .dwg file is not a ZIP container. More details on the file format can be found in my blog post "Analyzing .DWG Files With Embedded VBA Macros", but knowing these details is not a prerequisite to be able to perform an analysis as I show here.
This .dwg file that I was given contains indeed a VBA project, but it's an empty project, without actual code (remark indicator m for stream 3 and that stream 3 doesn't contain "real" VBA code, just the normal attributes).
I'm no longer an AutoCAD specialist (I used AutoCAD and AutoLISP a lot in the 90's), but as far as I know, subroutine names like Auto_Open, AutoOpen and Workbook_Open do not trigger automatic execution in AutoCAD. One needs to associate a subroutine with an AcadDocument event to trigger execution.
Like this sample, with exactly the same VBA source code (ignoring whitespace). This malicious Office document was submitted to VT one month earlier than the malicious AutoCAD drawing. And if we can trust the medata data of the Office document, then it's almost 2 years old.
So if you use AutoCAD in your organisation, know that drawings with embedded, malicious VBA code seem to be rare (caveat: my search was far from exhaustive), and that with modern versions of AutoCAD, VBA no longer comes pre-installed.
This sample uses AWS S3 storage to host client files and initiates forge design automation to compare two AutoCAD drawings, results the output drawing back to client, the output drawing contains visual graphical difference.
You can convert uploaded drawing packages into map data by using the Azure Maps Conversion service. This article describes the drawing package requirements for the Conversion API. To view a sample package, you can download the sample Drawing package.
The drawing package must be zipped into a single archive file, with the .zip extension. The DWG files can be organized in any way inside the package, but the manifest file must live at the root directory of the zipped package. The next sections detail the requirements for the DWG files, manifest file, and the content of these files. To view a sample package, you can download the sample drawing package.
A single DWG file is required for each level of the facility. All data of a single level must be contained in a single DWG file. Any external references (xrefs) must be bound to the parent drawing. For example, a facility with three levels has three DWG files in the drawing package.
The DWG file for each level must contain a layer to define that level's perimeter. This layer is referred to as the exterior layer. For example, if a facility contains two levels, then it needs to have two DWG files, with an exterior layer for each file.
If the layer contains multiple overlapping PolyLines, they're dissolved into a single Level feature. Instead, if the layer contains multiple non-overlapping PolyLines, the resulting Level feature has a multi-polygonal representation.
The DWG file for each level defines a layer containing units. Units are navigable spaces in the building, such as offices, hallways, stairs, and elevators. If the VerticalPenetrationCategory property is defined, navigable units that span multiple levels, such as elevators and stairs, are converted to Vertical Penetration features. Vertical penetration features that overlap each other are assigned one setid.
Door openings in an Azure Maps dataset are represented as a single-line segment that overlaps multiple unit boundaries. The following images show how Azure Maps converts door layer geometry into opening features in a dataset.
The DWG file for each level can contain a Zone layer that defines the physical extents of zones. A zone is a non-navigable space that can be named and rendered. Zones can span multiple levels and are grouped together using the zoneSetId property.
The DWG file for each level can contain a UnitLabel layer. The UnitLabel layer adds a name property to units extracted from the Unit layer. Units with a name property can have more details specified in the manifest file.
The DWG file for each level can contain a ZoneLabel layer. This layer adds a name property to zones extracted from the Zone layer. Zones with a name property can have more details specified in the manifest file.
The zip folder must contain a manifest file at the root level of the directory, and the file must be named manifest.json. It describes the DWG files to allow the Conversion service to parse their content. Only the files identified by the manifest are ingested. Files that are in the zip folder, but aren't properly listed in the manifest, are ignored.
You can convert uploaded drawing packages into map data by using the Azure Maps Conversion service. This article describes the drawing package requirements for the Conversion API. To view a sample package, you can download the sample drawing package v2.
The drawing package must be compressed into a single archive file, with the .zip extension. The DWG files can be organized in any way inside the drawing package, but the manifest file must be in the root directory. The next sections explain the conversion process and requirements for both the DWG and manifest files, and the content of these files. To view a sample package, you can download the sample drawing package v2.
One or more DWG layer(s) can be mapped to a user defined feature class. One instance of the feature is created from an entity on the mapped layer. For example, DWG layers chair, table, and couch are mapped to a feature class called furniture. A furniture feature is created for every entity from the defined layers. Additionally:
Text entities that fall within the bounds of a closed shape can be associated to that feature as a property. For example, a room feature class might have text that describes the room name and another the room type sample drawing package v2. Additionally:
The DWG file for each level must contain a layer to define that level's perimeter. For example, if a facility contains two levels, then it needs to have two DWG files, each with a layer that defines that level's perimeter.
If the layer contains multiple overlapping POLYLINES, they're combined into a single Level feature. Instead, if the layer containsmultiple nonoverlapping POLYLINES, the resulting Level feature has a multi-polygonal representation.
The drawing package must contain a manifest file at the root level and the file must be named manifest.json. It describes the DWG filesallowing the Conversion service to parse their content. Only the files identified by the manifest are used. Files that are in the drawing package, but aren't properly listed in the manifest, are ignored.
The file paths in the buildingLevels object of the manifest file must be relative to the root of the drawing package. The DWG file name must exactly match the name of the facility level. For example, a DWG file for the "Basement" level is Basement.dwg. A DWG file for level 2 is named as level_2.dwg. Filenames can't contain spaces, you can use an underscore to replace any spaces.
Although there are requirements when you use the manifest objects, not all objects are required. The following table shows the required and optional objects for the 2023-03-01-preview Conversion service.
The following guidelines give a detailed step by step overview of how to set up your drawings for in AutoCAD Software. You can download a demo copy for free that you can use for up to 30 days.
If using our materials, we recommend using our drawing templates, they help to verify scale and material type. Materials come in all different sizes depending on the maximum sheet size supplied from the manufacturer.
Try and use templates that suit best the scale of your drawings. i.e. if your components can fit within a 1000mm x 500mm template, do not position your drawing on a 2000mm x 1000mm template with lots of excess.
If you have lots of small components from the same material, it is best to draft these on a series of smaller templates approximately 1000mm x 500mm rather than on one large template. Cutting & engraving densely populated files over large areas can cause the material to warp during the process.
If you have elements of your drawing that will only fit onto a large template but do not need to use a whole sheet, just leave the remaining areas blank. We will only charge you for the amount of material you need.
For all materials, we have established optimized settings. In vector engraving terms the marking is cosmetic. Our optimum settings are shallow and typically a balance between legibility and cleanliness. (The Strokes & Fonts sample (0.25pt) on the material pages demonstrates the clarity achievable on each material.)
It is rare to raster engrave from drawings drafted in AutoCAD, but it is possible. As it is a purely vector-based program no lines can be raster engraved. Make sure all your lines you require to be engraved are set to vector engrave.
We have established optimized settings for all materials. In raster engraving terms the marking is cosmetic, shallow and typically a balance between legibility and cleanliness. The Strokes & Fonts sample on the material pages demonstrates the clarity achievable on each material.)
If you would like to achieve a deeper result or an engraving a little heavier let us know your specification. In laser terms depth is usually specified in microns. Our standard engrave is approx. 0.25 microns (depending on material) and has excellent legibility.
It is achievable, but the laser must run slowly meaning the concentrated heat build-up makes the material appear quite burnt / heat scorched. It is also more expensive to process. Raster and vector engraving is not an absolute science in terms of depth specification and therefore not suitable for making mechanical grooves or any features requiring precise depths. Achieving a certain depth is balance in variation between the laser power and speed. A depth of engraving will always be within a tolerance of +/-0.2mm.
3a8082e126