AutoCad 2000 Interface Documentation

advertisement
PDM9000 – Autocad 200x Interface
User guide
This description covers Web@PDM extension regarding cooperation with AutoCAD
2000/2002 system. Development based on Autocad 200x/Autocad 200x Mechanical and
Mechanical Desktop.
This guide covers basic installation, implementations at customer side may vary.
Because this guide is an extension to standard Web@PDM User Guide, some trivial
subjects are covered very shortly.
Index:
1.
STANDARD OPERATIONS
2
2.
WORKING WITH PARTSLIST
3
3.
WORKING WITH XREFS
4
4.
APPLICATION CENTER
5
5.
VIEWING DRAWINGS
6
6.
PLOTTING DRAWINGS
6
7.
TECHNICAL OVERVIEW
8
8.
STANDARD OPERATIONS
8
9.
PARTSLIST ANALYZE
9
10.
XREF OPERATIONS
10
11.
AUTOCAD2000 CONFIGURATION
10
12.
AUTOCAD2006 UPDATE
11
13.
AUTOCAD2010 UPDATE (64 BIT)
11
14.
AUTOCAD2014 UPDATE (64 BIT)
11
15.
SSV SERVER VIEW
12
16.
PLOT DEVICES CONFIGURATION
13
PDM9000 – Autocad Interface description
1
1. Standard operations
Autocad drawing is registered in PDM with special file format code: Autocad2000.
Opening is realized by standard PDM functions like for any other drawings.
To open a drawing, user should use a function “Check out + Open”. This function first
checks user rights for actual drawing. If all is ok, drawing is downloaded from central
server into local station. After successful download, drawing is loaded into Autocad
environment.
After opening a drawing, system switch to proper space and place titleblock. Titleblock is
filled with info from database.
User is free now to design a drawing. When drawing is ready and need to be saved there
are two ways to accomplish this task.
1. Switch to PDM and use function “Close drawing” and then “Check in”.
Closing drawing just save a local copy of the file. Check in operation, transfer local
drawing to the server.
2. Close drawing in Autocad, switch to PDM and use function “Check in”.
PDM9000 – Autocad Interface description
2
Second scenario is NOT recommended. It is faster but PDM has no chance to analyze a
drawing for partslist positions or XRef elements.
After long time of using PDM system, it may happen so user Checks out many drawings.
List of all rented files is accessible via menu panel in Web@PDM.
2. Working with partslist
Mechanical drawings may contain partslist positions. Partslist is analyzed during every
saving a drawing. Simply partslist analyze may be also called form application panel in
PDM.
All partslist positions are stored in a central database and can be accessed via object
manager.
PDM9000 – Autocad Interface description
3
After transferring partslist to main server, system expose different kinds of partslist. They
are accessed via REPORTS system menu.
3. Working with XRefs
During opening every drawing, system checks if there are some referenced drawings
(in Autocad syntax called Xrefs). If they are, system display additional panel with a list of
all additional files which need to be downloaded locally before main drawing can be open.
List contains some special information. Except drawing number, revision, name etc. There
is information about user which actually rent a drawing (this mean: blocking). If there are
some important info, this is marked in Comments. User may choose to download a
drawing in full mode or just take a read-only copy. This is defined by left checkbox. Like a
default, all checkboxes are on or off, it depends of global system settings. Additionally,
some drawings may be highlighted with different colors. Color red means so drawing is
blocked by other user or his status. Such drawing can not be rented in full mode. Color
green, mean so there is some additional remark for user. Example is a new revision of
detail drawing used on assembly.
Before main drawing can be open, system perform download of all used components.
PDM9000 – Autocad Interface description
4
Components rented in full mode may be edited „in place“ in Autocad. Components rented
for read-only, gets a read-only attribute on local drive and can not be modified nor check in
to the server.
Placing new Xref drawing on assembly is realized via Application Center. User should
switch to PDM, search for desired detail, call Application Center and run function „Place as
XRef“.
During closing, drawing is analyzed and all known XRef links are transferred into central
database. Such elements are accessed via standard drawing items, with code „XRef“.
4. Application Center
Application Center is a special panel for controlling functions designed for actual drawing
type (or application). Actual application center for Autocad consists of following functions:
Place as XRef – places actual PDM drawing on active Autocad drawing in Xref mode.
Place as Block – places actual PDM drawing on active Autocad drawing in Block mode.
This function can not be combined with XRef mode, Autocad prevent to have two elements
with the same name in different modes.
PDM9000 – Autocad Interface description
5
Place as Raster – places actual PDM drawing on active Autocad drawing in Raster mode.
This option is active for Tiff or Bitmap drawings only.
Replace by act. XRef – replaces all selected XRef elements by actual PDM drawing.
Function can be use for replacing parts or desired revisions of drawing.
Part list analysis + Save – perform partslist/XRef analyze and saves drawing. Final,
drawing stays in Autocad for future corrections.
Place Parts List – performs partslist analyze and places result on active Autocad drawing.
Result may vary, depends of actual Autocad configuration.
5. Viewing drawings
View of a drawing is possible in two ways. First one is to use standard SSV generator.
SSV will transform DWG format into GIF file and display it in new window.
This view is used for initial perspective. It has pure quality but is fast and independent of
user configuration. It works always under Internet Explorer even if user has no Autocad
installed. SSV expose additional filters like TIF, DWF and SAT (for 3D drawings). Result of
using these filters may vary. SSV always translate DWG into desired format but local
station MUST have installed Internet Explorer Plug In to properly view such file format.
Plug Ins are not a part Web@PDM installation, they must be purchased by independent
vendors. TIF format may be viewed by standard Windows Imaging. DWF format is
supported by WHIP! or VoloView. SAT format may be view by Spatial SAT viewer.
Second way to view the drawing is a classic download and view in dedicated viewer
defined in system configuration. In this mode, native DWG file is viewed, system do not
perform any transformation for the file. Mostly, users use VoloView for Local View
operations.
6. Plotting drawings
PDM9000 – Autocad Interface description
6
Plotting is realized by Web@PDM plot station. Plotstation sends request to SSV server,
which physically perform plot operation.
At first, plot operation is activated by PLOT button placed on variants list.
Now, drawing is placed on a Plotstation list.
User should choose desired plotter device, format etc.. Some drawings may be in
status different then „APPROVED“, such drawings are by default not marked for plotting,
user should mark them manually. Function PLOT, plots all marked drawings.
After plot operation, system sends requests to SSV. Requests are processed in order
they are registered. Field “Plot Info” gives actual status of plot operation. To retrieve
current operation status, user should use button “Refresh list”. System may present
following statuses:
- Waiting for registration
- Request approved
- Plotted / Printed
- Error: … error description …
PDM9000 – Autocad Interface description
7
Web@PDM – Autocad 2000 Interface
Technical description
This description covers Web@PDM extension regarding cooperation with AutoCAD
2000 system.
7. Technical overview
Web@PDM Autocad200x interface bases on OLE Automation technology. Interface
consists from three parts. First part resides on the server and delivers data via standard
ASP/HTML pages. Second part is coded inside local component installed on user station.
Third part is stored inside Autocad macro file delivered like an Acad.DVB file. Actually,
interface was tested with Autocad2000, 2000i, 2002 and Autocad Mechanical.
8. Standard operations
Starting Autocad 2000 from Web@PDM
When drawing is rented for edition and Autocad is not started, PDM starts it via OLE
interface. There may be confusion if user has installed more versions of Autocad, like
Autocad Mechanical or Mechanical Desktop. In this case, PDM will start “last used”
version.
To be sure, so user works on proper version (desired), there are two ways to handle this
problem. First one is simply, please start Autocad first, then open a drawing. PDM will
communicate with running Autocad and load a drawing.
Second way is to store definition about all used Autocad versions in local LTE9000.INI file.
System will display a list of versions installed and run desired one.
LTE9000.INI Sample entry:
[Acad Versions Installed]
ACAD1=AutoCad 2000 Standard|C:\Program Files\Acad2000\Acad.exe| C:\Program Files\Acad2000|
ACAD2= AutoCad 2002 Mechanical|C:\Program Files\Acadm 6\Acad.exe| C:\Program Files\Acadm 6|
ACAD3= AutoCad 2002|C:\Program Files\Acad2002\Acad.exe| C:\Program Files\Acad2002|
Drawing properties and titleblocks
During opening every drawing, PDM set some standard drawing properties follow
the information from a form. These properties are:
Drawing description Summary – Title
Creator
Summary – Author
PDM9000 – Autocad Interface description
(Benennung1 from PDM)
(User Full name from PDM)
8
Additional, Custom properties are set follow current configuration.
After loading a drawing into Autocad, PDM set a window caption to the special label
contained drawing id and a first description.
PDM sets a proper titleblock and fill it with values from a form. Titleblocks are separate
drawings, placed on a main drawing like a block with a name TITLEBLOCK and on the
layer with the same name.
Autocad titleblocks are defined in table WWW_LOGO_FORMAT, field
ACADBLOCKNAME.
9. Partslist analyze
Before saving a drawing, PDM scans it for existence of partslist position blocks. Block
names should keep a convention SLPOS_*
PDM9000 – Autocad Interface description
9
During analyzing, PDM transfer data from block attributes into drawing positions table
(U_ZEIZEI). All fields which names are equal to the names of block attributes are
transferred directly.
Partslist analyze is done by 2 steps. First step is made by Autocad VBA module which
analyze drawing’s contents and save it to the temporary file ACA2PDM.TXT. Second step
is done by PDM internal function which read out text file and transfer data to positions
table. Step 1 may be customized by end-user.
10.
XRef Operations
Default download mode is controlled by system variable XREFSRENTMODE. It may be
set to IW = Read-Write/IR = Read-Only
11.
Autocad2000 Configuration
When installing Autocad 2000, please verify so VBS Support option is checked.
Without this support, advanced functions from PDM interface will not start. To check if your
Autocad has this feature enabled, please start VBA manager from menu TOOLS  Macro
 VBA Manager.
System configuration page have a link to actual ACAD.DVB file which should be
stored in local Autocad configuration, Autocad should be able to find this file during
startup. Add it into Autocad File Support Path.
Name of the directory may vary, depends of user’s actual Autocad configuration.
To ensure, so PDM components are loaded, please start a VB macro called
…\acad.dvb!ThisDrawing.PDM_Info
Macro will produce a message box with information about PDM interface.
PDM9000 – Autocad Interface description
10
12.
Autocad2006 update
Autocad2006 default setting for variable BACKGROUNDPLOT is 2 which set file convert
to run like a background process. This slows down print or DWF/TIF/DXF process even
100 times.
This variable should be set to 0 (like in older versions of Autocad).
13.
Autocad2010 update (64 bit)
To activate VBA support for this Autocad (default installation do not installs VBA anymore),
please visit http://www.autodesk.com/vba-download. Download and install proper version
of VBA support.
ACAD.DVB file delivered with PDM9000 contains reference to Mechanical library:
“Autodesk SymBBAuto 2.0 Type Library”.
This library is renamed to:
“Autodesk SymBBAuto 3.0 Type Library”.
VBA runs in 32bit virtual environment and direct references to system libraries should point
to 32bit copies (natives are 64bit). Simple modification is needed:
In function PDM_WindowCaptionSet()
hAC = ActiveDocument.hWnd
should be:
hAC = ActiveDocument.hWnd32
DWGCHECK=2 (default is 1)
This variable must be set to 2 because it produces Autocad error by opening drawings
imported from other programs (mostly attached from local drives).
Error reported is like “Error Decrypting Data”
14.
Autocad2014 update (64 bit)
To activate VBA support for this Autocad (default installation do not installs VBA anymore),
please visit http://www.autodesk.com/vba-download. Download and install proper version
of VBA support.
ACAD.DVB should be stored in secure location or Autocad variable TRUSTEDPATHS
should be updated.
PDM9000 – Autocad Interface description
11
ACAD.DVB references should points to actual Autocad librarys:
VBA7 runs in 64bit environment and simple modification is needed:
Private Declare PtrSafe Function SetWindowText Lib "user32" Alias "SetWindowTextA"
(ByVal hWnd As Long, ByVal lpString As String) As Long
DWGCHECK=2 (default is 1)
This variable must be set to 2 because it produces Autocad error by opening drawings
imported from other programs (mostly attached from local drives).
Error reported is like “Error Decrypting Data”
15.
SSV Server View
SSV for Autocad is used for three operations: View, Plot and Conversion.
View is a JPG/DWF or DXF converting.
SSV Option dialog controls:
- default space which is presented for 2D view
- JPG printer driver used for view conversion
- DWF printer driver used for view conversion
- Style sheet table used for JPG view
- Style sheet table used for DWF view
These options are default. Operations Convert and Plot can use their own, private settings
defined in table ARCHIV_PLOT_DEVICELIST.
Such setting are stored in field ADDITIONALCOORDINATES which contains info about
used plotter driver and plotter configuration.
Sample:
|ACADCONFIGNAME=HP LaserJet 5Si.pc3|
ACADCanonicalMediaName=ISO_A3_(297.00_x_420.00_MM)|
How to get it ?
PDM9000 – Autocad Interface description
12
Problem may be to retrieve proper names from Autocad, specialy so they may be coded
internally with some strange names like “User261” or something. Easiest way is to write
some dummy names like:
|ACADCONFIGNAME=XXX| ACADCanonicalMediaName=XXX|
and try to plot. SSV will recognize actual Autocad settings and give an error message,
where all ConfigNames will be listed. Now, try again with proper ConfigName:
|ACADCONFIGNAME= HP LaserJet 5Si.pc3| ACADCanonicalMediaName=XXX|
SSV will recognize proper device (probably PC3 file) and retrieve all possible
CanonicalMediaNames. Choose the right one, depending of your configuration.
If you have Autocad, there is more simply way, define just simply macro which looks as
follow:
Sub PDM_SSV_PlotConfigInfo()
MsgBox "ConfigName: " & ActiveLayout.ConfigName & vbNewLine & _
"CanonicalMediaName: " & ActiveLayout.CanonicalMediaName, vbInformation, "Autocad
Configuration"
End Sub
Now, load empty drawing, set Page Setup to desired plotter and format and start macro. It
will display actual Autocad configuration.
16.
Plot devices configuration
Plot devices are configured in table ARCHIV_PLOTDEVICES stored in main database,
DDM9000. This table has following structure:
Field name
Field type
Description
USERNAME
Text
PLOTERID
PLOTERNAME
PLOTERTYPE
Number
Text
Text
PLOTFORMAT
Text
PLOTRESIZE
Memo
PLOTPORT
Text
~ - global device
username – device dedicated for user
Internal number
User friendly device name
Unique device name (for Logocad, this
name should be synchronized with
name used in LOGOCAD.PLD file)
Device output format.
Every output format should be defined
in separate line of this table
Resize parameters for formats defferent
then PlotFormat. Syntax as follow:
| A3 0,93 L | A3H 0,93 P | …
A3 – format field value from ZEI table
0,93 – resize parameter (value 0 means
– Fit To Page)
L/P – Landscape (0° rotation) or Portrait
(90° rotation)
Definition of this field depends of device
output format.
Computer port where device is attached
PDM9000 – Autocad Interface description
13
PLOTDEVDESIGN
Text
SSVDEVICENAME
SSVDEVICESHARE
Text
Text
ADDITIONALCOORDINATES Text
(parameter used only for Logocad
Plotstation)
Logical separation between plotters
(used for plotting drawings) and printers
(used for printing documents)
ZEI – plotter
DOC - printer
Device name visible by SSV server
Device share name visible by SSV
server
Additional attributes used by SSV.
Description below.
Sample definition for HP LaserJet uses as a plotter is as follow:
Field name
USERNAME
Sample value
~
description: device used for all users
PLOTERID
1
description: system internal number
PLOTERNAME
HP LaserJet 5Si-MX (A3-A4)
description: user friendly name
PLOTERTYPE
HP5Si
description: coded name, unique for this printer
use the same name for all formats of this printer
PLOTFORMAT
A4
description: destination print format
PLOTRESIZE
! A4 0 L ! A4H 0 P ! A3 0 L ! A3H 0 P ! A2 0 L ! A2H 0 P ! A1 0
L ! A1H 0 P ! A0 0 L !
description: all formats printed in FitToPage size. Portrait formats are
rotated 90 degree
PLOTPORT
LPT1
description: parameter used only by Logocad Plotstation. If all
drawings are f.x. Autocad drawings, this field may be Null
PLOTDEVDESIGN
SSVDEVICENAME
ZEI
description: device dedicated for drawings
\\LTESERVER\HP LaserJet 5Si Mopier PCL 5e
description: device name visible by SSV server
SSVDEVICESHARE
\\LTESERVER\HP LaserJet 5Si Mopier PCL 5e
description: share name visible by SSV server (may be different them
device name)
ADDITIONALCOORDINATES
|ACADCONFIGNAME=HP LaserJet 5Si.pc3
|ACADCanonicalMediaName=ISO_A4_(210.00_x_297.00_MM)
|ACADStyleSheet=ACAD.ctb
|ACADPLOTUPSIDEDOWN=0
|ACADCONFIGNAME_DWF=DWF.pc3
|ACADCanonicalMediaName_DWF=A0
|ACADStyleSheet_DWF=ACAD.ctb|
description: Autocad configuration for plotting on HP printer, we define
special PC3 plotter driver. If there is no PC3 file, please use device
share name instead.
Plotting:
PDM9000 – Autocad Interface description
14
ACADCONFIGNAME – Printer driver (pc3 file) used for plotting
ACADCanonicalMediaName – Printer paper format used for plotting
ACADStyleSheet – Style sheet table name used for plotting
ACADPLOTUPSIDEDOWN – 0/1 - upside-down parameter (default: 0)
ACADCENTERPLOT – 0/1 – centerplotting parameter (default: 0)
ACADPLOTOFFSETX – 0 – plot offset X parameter, in millimeters. Used only when
centerplot is 1. (default: 0)
ACADPLOTOFFSETY - 0 – plot offset X parameter, in millimeters. Used only when
centerplot is 1. (default: 0)
DWF converting:
ACADCONFIGNAME_DWF – pc3 driver used for DWF conversion
ACADCanonicalMediaName_DWF - Printer paper format used for DWF conversion
ACADStyleSheet_DWF - Style sheet table name used for DWF conversion
Alternative interface modes
By default, AutoCAD interface communicates with VBS script module stored inside
AutoCAD (ACAD.DVB). This script is a part of PDM installation and may/should be
customized on final installation. This solution is fast and flexible but some customers found
it not acceptable. Not enough acceptable  So, there is a switch now in local INI file:
LTEICSettings / ACADCOMMANDMODE
ACADCOMMANDMODE
0 (or nothing, default)
1
2
Mysłowice 23.02.2003
Description
Standard mode, LocalComponent talks with AutoCAD script.
(easy and fast)
LocalComponent calls AutoCAD commands. AutoCAD logic
may be converted into .NET module and exposed like a
commands. (hard but fast)
LocalComponent internally invokes ActiveX
PDM_Acad_Module.PDM_Class1 which do the job. (easy but
slow)
(mod 17.05.2011)
Adam Wieczorek
LOGOTEC Engineering S.A.
Research Department
PDM9000 – Autocad Interface description
15
Download