NAME

CAD::AutoCAD::Version - Class which work with AutoCAD versions.

DESCRIPTION

This class describes AutoCAD versions and it's identifiers.

List of identifiers is in Wikipedia article.

SYNOPSIS

use CAD::AutoCAD::Version;

my $obj = CAD::AutoCAD::Version->new;
my @acad_identifiers = $obj->list_of_acad_identifiers;
my @acad_identifiers_real = $obj->list_of_acad_identifiers_real;

METHODS

new

my $obj = CAD::AutoCAD::Version->new;

Constructor.

Returns instance of object.

list_of_acad_identifiers

my @acad_identifiers = $obj->list_of_acad_identifiers;

List AutoCAD release identifiers. This identifiers are used e.g. as magic string in DWG file or as $ACADVER in DXF files.

Returns array of identifiers.

list_of_acad_identifiers_real

my @acad_identifiers_real = $obj->list_of_acad_identifiers_real;

List AutoCAD release identifiers. This identifiers are used e.g. as magic string in DWG file or as $ACADVER in DXF files. Ordered by date of AutoCAD releases.

Returns array of identifiers.

ERRORS

new():
        From Class::Utils:
                Unknown parameter '%s'.

EXAMPLE1

use strict;
use warnings;

use Data::Printer;
use CAD::AutoCAD::Version;

# Object.
my $obj = CAD::AutoCAD::Version->new;

# Create image.
my @acad_identifiers = sort $obj->list_of_acad_identifiers;

# Print out type.
p @acad_identifiers;

# Output:
# [
#     [0]  "AC1.2",
#     [1]  "AC1.3",
#     [2]  "AC1.40",
#     [3]  "AC1.50",
#     [4]  "AC1001",
#     [5]  "AC1002",
#     [6]  "AC1003",
#     [7]  "AC1004",
#     [8]  "AC1006",
#     [9]  "AC1009",
#     [10] "AC1012",
#     [11] "AC1013",
#     [12] "AC1014",
#     [13] "AC1015",
#     [14] "AC1018",
#     [15] "AC1021",
#     [16] "AC1024",
#     [17] "AC1027",
#     [18] "AC1032",
#     [19] "AC1500",
#     [20] "AC2.10",
#     [21] "AC2.21",
#     [22] "AC2.22",
#     [23] "MC0.0"
# ]

EXAMPLE2

use strict;
use warnings;

use Data::Printer;
use CAD::AutoCAD::Version;

# Object.
my $obj = CAD::AutoCAD::Version->new;

# Create image.
my @acad_identifiers_real = $obj->list_of_acad_identifiers_real;

# Print out type.
p @acad_identifiers_real;

# Output:
# [
#     [0]  "MC0.0",
#     [1]  "AC1.2",
#     [2]  "AC1.3",
#     [3]  "AC1.40",
#     [4]  "AC1.50",
#     [5]  "AC2.10",
#     [6]  "AC2.21",
#     [7]  "AC2.22",
#     [8]  "AC1001",
#     [9]  "AC1002",
#     [10] "AC1003",
#     [11] "AC1004",
#     [12] "AC1006",
#     [13] "AC1009",
#     [14] "AC1012",
#     [15] "AC1013",
#     [16] "AC1014",
#     [17] "AC1015",
#     [18] "AC1018",
#     [19] "AC1021",
#     [20] "AC1024",
#     [21] "AC1027",
#     [22] "AC1032",
#     [23] "AC1500"
# ]

DEPENDENCIES

Class::Utils, Readonly.

SEE ALSO

CAD::AutoCAD::Detect

Detect AutoCAD files through magic string.

File::Find::Rule::DWG

Common rules for searching DWG files.

REPOSITORY

https://github.com/michal-josef-spacek/CAD-AutoCAD-Version

AUTHOR

Michal Josef Špaček mailto:skim@cpan.org

http://skim.cz

LICENSE AND COPYRIGHT

© 2020-2024 Michal Josef Špaček

BSD 2-Clause License

VERSION

0.06