CAD::Drawing::Template

Replace tags with text and geometry
Download

CAD::Drawing::Template Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • Eric Wilhelm
  • Publisher web site:
  • http://search.cpan.org/~ewilhelm/

CAD::Drawing::Template Tags


CAD::Drawing::Template Description

Replace tags with text and geometry CAD::Drawing::Template is a Perl module to replace tags with text and geometry.SYNOPSIS my $bp = CAD::Drawing::Template->new(); $bp->load('my_template.dxf'); # set some values for the boiler-plate: $bp->set_data(foo => 'value for foo'); my @parts = qw(E8955 Q4200); $bp->set_vtable(parts => \@parts); $bp->set_geom(birdseye => 'birdseye.dwg'); my $drw = $bp->done(pass => qr/^shipping/, die => 0); $drw->save('output.dxf');Input TemplatesInput templates must be CAD::Drawing compatible files or objects. These are brought into the CAD::Drawing::Template object via load() or import() and searched for 'texts' items which match the formats listed below.The tags may be on any layer in the drawing except 'comments' and 'fit' which are reserved names. The 'comments' layer is completely discarded, and the 'fit' layer must only contain rectangles (which are necessary for scaling calculations, but are also discarded.)Tag FormatsThe 'tags' are 'texts' entities (single-line text in dwg/dxf formats) which must begin and end with matching angle-brackets (''.) These text entities are sourced for their insertion point, text height, and name. Future versions of this module will support orientations, fonts, and options within the tag text itself.In general, tags are formatted as . Where $type is one of the types defined below and $name is the name of the tag (to be used in addressing it via the set_*() functions. Requirements: · Perl


CAD::Drawing::Template Related Software