Please help! Lisp problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, just to let you all know I only have basic knowledge of coding and I used ChatGpt to create this code. I'm trying to create a Lisp for zwcad(autocad) that could help me to increase my performance at my job. I want a block name to be automatically chosen and placed according to a length of a polyline selected on a model space after command is executed. So after I select a polyline, it should calculate a length of a polyline and find a midpoint. I want base point of a block to be an inserting point of a block and base point should be placed at midpoint of a polyline. For example if a length of a polyline I select is '8000mm', it calls a block name '7100e (8000-900 + suffix 'e')' from the block list and places that block at midpoint of selected polyline. I am certain there are block names ranging from 5400e~12200e (in increment of 100), but it doesn't seem to be able to find a block name appropriate to the length of a polyline. I've been keep getting this error message "Error: Retrieving the ID of the failed name - nil". Please help me it's urgent...