یک فایل JavaScript را از URL بارگیری می کند، و سپس کد JavaScript موجود در پرونده را اجرا می کند .
به شما اطمینان می دهد که نام URL و پرونده JavaScript را وارد کنید. مثلا
Command: WEBLOAD Enter name of URL to load: http://website/filename.js
پرونده جاوا اسکریپت باید دارای یک تعریف عملکرد و فراخوانی تابع باشد که در مثال ساده زیر نشان داده شده است.
// Function definition function pickPoint() { function onComplete(args) { var resObj = JSON.parse(args); if (resObj) alert('You picked: ' + resObj.value.x + "," + resObj.value.y + "," + resObj.value.z); } function onError(args) { alert('Error picking point: ' + args); } var optionsFirst = new Acad.PromptPointOptions('Pick a point', new Acad.Point3d(0, 0, 0)); Acad.Editor.getPoint(optionsFirst).then(onComplete, onError); } //Invocation of function pickPoint();
Loads a JavaScript file from a URL, and then executes the JavaScript code contained
in the file.
Prompts you to enter the name of a URL and JavaScript file. For example
Command: WEBLOAD Enter name of URL to load: http://website/filename.js
The JavaScript file must contain a function definition and an invocation of the function
as shown in the simple example below.
// Function definition function pickPoint() { function onComplete(args) { var resObj = JSON.parse(args); if (resObj) alert('You picked: ' + resObj.value.x + "," + resObj.value.y + "," + resObj.value.z); } function onError(args) { alert('Error picking point: ' + args); } var optionsFirst = new Acad.PromptPointOptions('Pick a point', new Acad.Point3d(0, 0, 0)); Acad.Editor.getPoint(optionsFirst).then(onComplete, onError); } //Invocation of function pickPoint();
بنده سیامک دوستداری فارغ التحصیل رشته مکانیک سنگ از دانشگاه صنعتی اصفهان هستم، و در این وبسایت آموزش های مربوط به نحوه برنامه نویسی در اتوکد و هچنین آموزش تصویری دستورات اتوکد را قرار خواهم داد.
تلفن همراه: ۰۹۰۰۱۲۳۴۴۴۴
ایمیل: s.doostdari@gmail.com