|
Property |
Type |
Required |
Description |
|
wrapid |
String |
true |
Drawing container DOM ID(Width and Height are needed to set container) |
|
language |
String |
false |
Language Settings,available options 'zh'(Simplified Chinese)/'en'(English)/'ko'(Korean),default 'zh |
|
apiHost |
String |
false |
API domain name, requests need to be sent to this domain name if Convert to PDF and Save As function are needed |
|
toolbarHideItems |
Object |
false |
Set menu items to be hidden |
|
|
|
|
5.The second step is to open default CAD drawing ocf file, arraybuffer is binary system data of ocf file, the render function can render and display ocf file.
|
Property |
Type |
Required |
Description |
|
type |
string |
true |
type of rendered data, only “ocf”is currently supported |
|
bufferData |
arraybuffer |
true |
arraybuffer format binary system data object |
|
fileId |
String |
true |
Unique identifier for the current drawing, pdf conversion and version conversion will need this parameter |
|
defaultViewport |
Boolean |
false |
default false:Viewport is full drawing when opening the drawing; true: the default viewport when saving the drawing |
6.Clicking the layout function from front end and switching to other layout will trigger layout switch event, with obj.globalName, we get layout name, If the back end return all ocf files corresponding to layout, we can directly get corresponding ocf with layout name.
If only the ocf of default layout is returned, after switching the layout, please refer to the annotated codes below, send requests to back end and wait for the back end to return ocf file link of the current layout.
