Members
WMeshGms
- Description:
讀寫GMS的ASCII檔檔
- Source:
讀寫GMS的ASCII檔檔
Example
Methods
(async) readGms(fp) → {Promise}
- Description:
讀取GMS的ASCII檔
- Source:
Example
let fpXyz = './_mesh/YiLan_xyz.txt'
let fpTop = './_mesh/YiLan_top.txt'
let fpBot = './_mesh/YiLan_bot.txt'
let fpMat = './_mesh/YiLan_mat.txt'
wmg.readGms(fpXyz, fpTop, fpBot, fpMat)
.then((res) => {
console.log(res)
console.log('finish.')
})
.catch((err) => {
console.log(err)
})
Parameters:
Name | Type | Description |
---|---|---|
fp |
String | 輸入檔案位置字串 |
Returns:
回傳Promise,resolve回傳ltdt(各數據列為物件陣列),reject回傳錯誤訊息
- Type
- Promise
(async) writeGms(fp, data, optopt) → {Promise}
- Description:
輸出數據至GMS檔案
- Source:
Example
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fp |
String | 輸入檔案位置字串 |
||||||||||||||||||||||
data |
Array | 輸入數據陣列,為mat或ltdt格式 |
||||||||||||||||||||||
opt |
Object |
<optional> |
{}
|
輸入設定物件,預設{} Properties
|
Returns:
回傳Promise,resolve回傳成功訊息,reject回傳錯誤訊息
- Type
- Promise