Какой метод будет вызывать информацию базы данных SQL внутри этой функции? - PullRequest
0 голосов
/ 15 октября 2019

Я пытаюсь отозвать информацию из моей автономной базы данных, где ExternalId является первичным ключом. Какой метод лучше всего подходит для подключения к моей базе данных и обратного вызова информации из нее? Я пытаюсь сохранить его в этом блоке кода, если смогу.

CustomPropertyPanel.prototype.setProperties = function (properties, options) {
Autodesk.Viewing.Extensions.ViewerPropertyPanel.prototype.setProperties.call(this, properties, options);
// add your custom properties here
// for example, let's show the dbId and externalId
var _this = this;
//This removes all unwanted properties.
this.removeAllProperties() 

// dbId is right here as nodeId
this.addProperty('dbId', this.nodeId, 'InteMation Properties');

// externalId is under all properties, let's get it!
this.viewer.getProperties(this.nodeId, function (props)
{
    _this.addProperty('externalId', props.externalId, 'InteMation Properties');
});

}

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...