JavaScript Application Programming Interface (API) for AutoCAD
ContentsIndexHome
PreviousUpNext
Acad.DataItemCollectionManager.getKnownCollection Function

Autodesk.AutoCAD.js

JavaScript
function Acad.DataItemCollectionManager.getKnownCollection(colName);
Parameters 
Description 
colName 
is the name of the collection you want to fetch. For example, if you want to fetch layer collection, you must specify "LAYER". Other valid key value options are: “DIMSTYLE", LAYER", ”TEXTSTYLE", "LINETYPE, "NAMEDVIEWS", "UCS_PLANES, "COLOR, "BLOCK", "VIEWPORT", ”LAYERFILTERS", "SCALELIST", "ACAD_TABLESTYLE”, "ACAD_MLEADERSTYLE", "ACDI_DATAITEM_SELECTED_ITEMS", “ACAD_VISUALSTYLE",  "ACAD_MATERIAL", "ACAD_PLOTSTYLENAME", "ACAD_LAYERSTATES".

Use this asynchronous function to get a known collection.

Returns

Returns a Promise object for which users need to specify .then(OnSuccess, onError). For example, function Acad.DataItemCollectionManager.getKnownCollection(colName).then(onSuccess,onError);

onSuccess
is a function type called on successful completion of getKnownCollection function. 
onError 
is a function type called when an error occurs. 

 

Links
Copyright (c) 2016. All rights reserved.
What do you think about this topic? Send feedback!