LISP for creating sheets in Autocad

LISP for creating sheets in Autocad

lastorderly
Observer Observer
375 Views
3 Replies
Message 1 of 4

LISP for creating sheets in Autocad

lastorderly
Observer
Observer

Hello,

 

I used to work with a Windows version of AutoCAD and employed a LISP file to create layouts. This file allows creating layouts of formats such as A2, A3, etc., from blocks of the corresponding size.

 

Now that I’ve switched to the macOS version, the original LISP file no longer works. Could you please advise if it’s possible to adapt the script for macOS or suggest any alternative solutions?

 

Attached is the original LISP file. It is invoked using the “AL” command. After activation, you select the block with the frames from which the script will determine the width and height. Then, you select the blocks with the frames that will be used to create the layouts. After that, there is an option to delete the existing layouts (or not) and specify the starting number for the new layouts.

0 Likes
376 Views
3 Replies
Replies (3)
Message 2 of 4

pendean
Community Legend
Community Legend
MAC variants cannot use some of the VLAX content in that LISP, or a complete rewrite is needed.

Can you translate the prompts into English? I see nothing but icons and such, so I have no idea how this all works or what the entries even mean
; Óêàçàòåëü ïðèëîæåíèÿ
; Óêàçàòåëü àêòèâíîãî äîêóìåíòà
; Óêàçàòåëü ïðîñòðàíñòâà ìîäåëè
and so on.
0 Likes
Message 3 of 4

lastorderly
Observer
Observer

These are comments of the script developer in Russian, they have Windows-1251 encoding:

 

Добавить слои в пространстве листов / Add layers in paper space

Загрузка библиотеки ActiveX / Load ActiveX library

Переход на модельный лист / Switch to the model tab

Инициализация с ожидаемым типом данных / Initialize with expected data type

Получение приложения AutoCAD / Retrieve AutoCAD application

Получение активного документа / Retrieve the active document

Получение пространства модели / Retrieve model space

Получение настроек отображения AutoCAD / Retrieve AutoCAD display preferences

Запрос имени слоя для фильтрации объектов / Prompt for layer name to filter objects

Выбор объекта для создания рамки / Select an object to create a frame

Определение слоя объекта / Determine the object's layer

Получение списка объектов на слое / Retrieve a list of objects on the layer

Получение количества объектов на слое / Retrieve the count of objects on the layer

Запрос масштаба / Prompt for scale

Проверка на динамический блок / Check if the object is a dynamic block

Получение габаритного контейнера динамического блока / Retrieve bounding box of the dynamic block

Получение габаритного контейнера обычного объекта / Retrieve bounding box of a regular object

Извлечение координат объектов / Extract object coordinates

Сортировка объектов по координатам X или Y / Sort objects by X or Y coordinates

Проверка включенности автоматического создания видовых экранов / Check if automatic viewport creation is enabled

Отключение автоматического создания видовых экранов / Disable automatic viewport creation

Запрос на удаление всех листов / Prompt for deleting all layouts

Удаление всех листов, кроме модельного / Delete all layouts except the model

Запрос начального номера для листов / Prompt for the starting sheet number

Переименование первого листа / Rename the first layout

Проверка на существование листов с заданными номерами / Check if layouts with the given numbers exist

Уведомление о конфликте номеров листов / Notify about conflicting sheet numbers

Создание нового листа / Create a new layout

Установка текущего листа / Set the current layout

Определение параметров видового экрана / Set viewport parameters

Отображение видового экрана / Display the viewport

Установка модели в пространстве листа / Set the model in paper space

Центровка вида в видовом экране / Center the view in the viewport

Блокировка отображения видового экрана / Lock viewport display

Установка стиля печати для листа / Set the plot style for the layout

Настройка типа печати на листе / Configure the plot type for the layout

Выбор формата бумаги на основе размеров экрана / Select paper size based on screen dimensions

Установка ориентации печати на листе / Set the print orientation on the layout

Масштабирование всего на листе / Zoom all on the layout

Переход на модельный лист после завершения / Switch to the model tab after completion

Функция для нахождения минимального элемента списка / Function to find the minimum element in a list

Функция для нахождения максимального элемента списка / Function to find the maximum element in a list

Функция для извлечения габаритного контейнера динамического блока / Function to extract the bounding box of a dynamic block

Проверка на наличие ошибок при извлечении контейнера / Check for errors while extracting the bounding box

Получение масштабов координат блока / Retrieve block coordinate scales

Применение координат для формирования габаритов блока / Apply coordinates to define block dimensions

0 Likes
Message 4 of 4

paullimapa
Mentor
Mentor

Maybe best to invest in Parallels Desktop. Then you can install Windows version of AutoCAD on your Mac and run all the same lisp functions.

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes