View Full Version : Update AutoCAD 2005 routine so it runs in 2007 - error "no tags"
methost
2007-03-26, 06:20 PM
I have a lsp file that I used in acad2005 quite often. My new job has me upgraded to 2007 and now I get a "no tags" error when I try to run my lsp. Is there an easy conversion? Im REAL clumbsy at actually writing them still and this one was made with the help of others.
methost
2007-03-26, 06:40 PM
Just tested this lsp in 2006 and it seems to work fine there as well. So whats different about 2007?
david_peterson
2007-03-26, 07:02 PM
Just tested this lsp in 2006 and it seems to work fine there as well. So whats different about 2007?File format change. What is your lisp supposed to do?
kennet.sjoberg
2007-03-26, 09:31 PM
Previous versions of AutoCAD is more forgiving than AutoCAD 2007
you use a built-in symbol name as a variable name in the code that you should not,
try to change the variable name last (not "last" ) to LastEnt or similar ( 3 places ) and try again.
And for the good sake, declare all local variables as local.
: ) Happy Computing !
kennet
kennet.sjoberg
2007-03-26, 10:23 PM
Here is one new ( bad and good ) thing in 2007 that have given me a loot of pain
these systemvariables are old INSUNITS, INSUNITSDEFSOURCE, INSUNITSDEFTARGET
but the usage of them is changed and will get you pain. ( please read the help file )
They can hold twenty different database units:
0 Unspecified (No units)
1 Inches
2 Feet
3 Miles
4 Millimeters
5 Centimeters
6 Meters
7 Kilometers
8 Microinches
9 Mils
10 Yards
11 Angstroms
12 Nanometers
13 Microns
14 Decimeters
15 Dekameters
16 Hectometers
17 Gigameters
18 Astronomical Units
19 Light Years
You must set apropriate value to each model to get it to work proper,
otherwise an "automatic AutoDesk smart scaling factor" is added if you like it or not,
and your Block and Xref may get wrong scaling.
Example:
You have one old model that is drawn in millimetres but the systemvariable in some cases is set default to 2=Feet ( Microstation ? ), and you have a second model drawn in Meters but the systemvariable is set to 0=No units.
When you insert/attach those models to the third model drawn in Millimeters where the systemvariable is set correct to 4=Millimeters
and you know you set the correct scale factor, then the "smart" scale factor is added and the result is malfunction.
But now you know way . . . and after a part of your lifetime all of your models and blocks have the correct systemvariable and everything is just fine, until that :beer: :)
It affekts both Blocks and Xrefs.
: ) Happy Computing !
kennet
methost
2007-03-27, 11:49 AM
As I said, Im not much of a programmer. I tried renaming the 'last' variable but that didn't fix the error. And you lost me on the units of measure. I wasn't sure if you were giving a lesson or pointing out a flaw in my LSP.
This LSP takes water pressure information taken from a fire hydrant and calculates GPMs. It also presents this information on a graph.
kennet.sjoberg
2007-03-27, 01:33 PM
. . .you lost me on the units of measure. I wasn't sure if you were giving a lesson or pointing out a flaw in my LSP.
No, the units is not ( ? ) a lisp issue, but your code use Xrefs and there may be some problem with them. Try to load them manually.
: ) Happy Computing !
kennet
BTW you must set the AutoCAD's searchpath to your Xref's.
methost
2007-03-29, 11:45 AM
No, the units is not ( ? ) a lisp issue, but your code use Xrefs and there may be some problem with them. Try to load them manually.
: ) Happy Computing !
kennet
BTW you must set the AutoCAD's searchpath to your Xref's.
It should find those xrefs easy enough. They are in the path and can be xref'd or inserted manually. It seems the xref command doesnt work the way it used to. Is there still an xref command that doesnt open a pop-up window? How can I tell this LSP to import these blocks?
(setvar "osmode" 0)
(command "xref" "d" "grap*")
(command "xref" "a" "graph" "-0,0" "" "" "")
(setq p1 (list -4.0 0.0))
(setq p2 (list -7.0 0.0))
(setq p3 (list -10.0 0.0))
(setq p4 (list (* (expt 10.0 1.85) 12) 0.0))
(setq p5 (list -14.0 0.0))
methost
2007-03-29, 11:49 AM
ok I found that "xref" must be changed to "-xref". But I still get the same "NO TAGS FOUND" error. Seems to work fine in Acad 2006 though.
methost
2007-03-31, 01:07 PM
So there is no major difference between 2006 and 2007 that could be causing this?
RobertB
2007-03-31, 05:42 PM
I've made some major user interface modifications, and have it working in 2007. Like Kennet mentioned, the source drawings for the XRefs need to be on the search path or current folder.
methost
2007-04-02, 11:47 AM
I've made some major user interface modifications, and have it working in 2007. Like Kennet mentioned, the source drawings for the XRefs need to be on the search path or current folder.
Thanks for taking the time to help out. I find that I am getting the same "NO TAGS FOUND" error, even with your version. Obviously if you have it working, the trouble is on my end. The source drawings for the xrefs are in c:/details/. This folder is in my autocad seach path. I assume this is what you are talking about.
methost
2007-04-09, 11:09 AM
Anyone have any more guesses as to what my problem could be?
abdulhuck
2007-04-09, 12:51 PM
and now I get a "no tags" error when I try to run my lsp. Is there an easy conversion?
Hi,
At a glance, I feel that this error might come from some other file. So please give us some details.
1. Do you manually load this file? If no, how do you load it?
2. If you load this successfully, when you type command "ft", do you get the prompts? I wish to know at what stage this error occures.
3. Do you (or somebody else) have defined "ft" for some other function? If you are not sure, try to change
(defun c:ft to
(defun c:FlowTest and try.
4. If you have any acaddoc.lsp or acad.lsp or any other routine loaded after this file, you have to check them as well.
Regards
methost
2007-04-09, 05:33 PM
Hi,
At a glance, I feel that this error might come from some other file. So please give us some details.
1. Do you manually load this file? If no, how do you load it?
2. If you load this successfully, when you type command "ft", do you get the prompts? I wish to know at what stage this error occures.
3. Do you (or somebody else) have defined "ft" for some other function? If you are not sure, try to change
(defun c:ft to
(defun c:FlowTest and try.
4. If you have any acaddoc.lsp or acad.lsp or any other routine loaded after this file, you have to check them as well.
Regards
I have been loading this lsp manually.
I see that ft may be being used by my add-on software to perform another function. Ill see about changing things around.
methost
2007-04-09, 05:37 PM
Turns out that was the issue. Thanks!
Newbie question now ... in 2007, which file do I alter to add this lsp to the auto-load?
Thanks again!
david_peterson
2007-04-09, 05:45 PM
Under tools/load application. Put it in the "start up" contents.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.