Hello
I have this code which gives errors at the first run,then when it's cancelled and rerun, it works fine.Someone can help?
|
Hello
I have this code which gives errors at the first run,then when it's cancelled and rerun, it works fine.Someone can help?
As kpblc said "You have to make all variables local. Variables width, textheight and so on are not setted at first run."
https://www.theswamp.org/index.php?topic=56768.0
Hello
My knowledge about Autolisp is so limited...could you please attach the final code? I can't put things together to get the new code.
Thanks
You'd be better off describing what you're expecting the code to do exactly. Over 20 global variables and 3 functions to do this?
I'm sure there's code to do it already having localized variables and an *error* function set up that tests if Layers, Text Styles and Linetypes exist and only adds them if necessary.
It's always helpful to include the software and version you're using in your signature as answers are often specific to them. In this case setting up major and minor grid lines are easy in recent versions of AutoCAD.
Are you wanting the grid lines to be plottable?
https://forums.augi.com/profile.php?do=editsignature
Of curse I want them to be plottable. I'm using Autocad Map 3d 2020 and have tested the code in many previous versions and got the same results.
All you code did was draw a rectangle.
If that's all you need it to do why not just use the RECTANG command?
Again "You'd be better off describing what you're expecting the code to do exactly."
If you can't put that much effort into asking others to spend their time doing your job you're not going to get much response.
Okay brother,that code draws (at the second run, since it returns some errors at the first run) a grid of lines with coordinates all around, similar to many lisps but I want this specific code.
Anyway this video explains the work of it:https://www.youtube.com/watch?v=jgKErmSIa1M
Thanks
If you google you will be swamped with draw grids options find one that works. It sounds like the code in the one you tried has some problems. Rather than fix find another
I have an advanced one that draws grids in paperspace viewport layouts but based on model space co-ordinates.
I know there's a variety of lisps that can do a similar work,mine is so convenient...Could you please attach a copy?