Jump to content

autolisp


guhan

Recommended Posts

  • Replies 32
  • Created
  • Last Reply

Top Posters In This Topic

  • guhan

    15

  • ReMark

    10

  • pBe

    3

  • irneb

    3

Top Posters In This Topic

It will be basically the same thing assuming the OP still has his installation CD.

 

There's one more reason why it might not work. He may have loaded 2004 on a 64-bit machine. His computer will recognize and run 32-bit and 64-bit code. It won't run 16-bit code which, I believe, is what the installer for Express Tools was written in for AutoCAD 2004.

Edited by ReMark
added reference to 16-bit installer
Link to comment
Share on other sites

It's a disease. What can I say? I'm trying to get help with it via a support group. It isn't going well at the moment.
What's it called? HA? ... Helpholics Anonymous?

 

To the OP, it sounds as if you're out of luck. If you can't install the Express tools from your CD and get it to work through the tutorial that troggraf linked to, it's not going to work. The lisp is quite involved, even for these Helpholics in this forum (me included). And since it's available to everyone else already, we don't really see us spending such a long time in coding something again just for one person. What I'd suggest is you install your 2004 on a 32bit XP machine which should allow you to run Express tools. If you can't do that then get a Virtual 32bit XP, see M$'s site about the Windows XP Mode for their Virtual PC suite in Win7.

Link to comment
Share on other sites

Good Day ReMark, I have loaded autocad 2004 on a 32-bit machine. The options are visible but the actions are not happened. Please give me the clear-cut idea. Is it a solvable problem??????

Link to comment
Share on other sites

It should be. During the installation process you probably forgot to place a checkmark in the box for loading Express Tools. Put the installation CD back in and you'll be given the option to make up for that mistake.

Link to comment
Share on other sites

Fantastic ReMark, I could not forget your help at all times. Wat a helping mind. Thanks ya. You read the newer mind who all are to this autocad. Oh.

I found and install express tool on autocad 2004 successfully. As we discussed the earliest, could i find the duplicate line and delete it through overkill method???

Link to comment
Share on other sites

Thanks buddy.To this"we don't really see us spending such a long time in coding something again just for one person. What I'd suggest is you install your 2004 on a 32bit XP machine which should allow you to run Express tools."Thanks Buddy.

Link to comment
Share on other sites

how can we find the current layer of dwg file..eg.layers in dwg file 2207,2403,2234,5566-t,4545-t
In the current drawing, the current layername is listed in the CLAYER system variable. So in lisp you'd do:

(getvar 'CLAYER)

If you mean you want to find the current layer in some other drawing, then you'd need to use ObjectDBX through lisp and get hold of the ActiveX document of that DWG file. Then get its ActiveLayer property. Say you've got the path & filename of the DWG saved in some variable, e.g. FileName:

(defun GetDWG-CLayer (FileName / acver dbx doc LayName)
 (setq dbx (vlax-create-object
             (if (< (setq acver (atoi (getvar 'ACADVER))) 16)
               "ObjectDBX.AxDbDocument"
               (strcat "ObjectDBX.AxDbDocument." (itoa acver))
             )
           )
 )
 (if (not (vl-catch-all-error-p (setq doc (vl-catch-all-apply 'vla-Open (list dbx FileName)))))
   (progn
     (setq LayName (vla-get-ActiveLayer doc))
     (vla-Close doc)
   )
 )
 (vlax-release-object dbx)
 LayName
)

Untested.

Link to comment
Share on other sites

I don't understand what you mean. You're in the AutoLisp forum. You asked how to find the current layer in a dwg file. Both methods I gave you will return the current layer's name. The first one gives the current drawing's current layer's name, the second gives the current layer's name in another drawing.

 

E.g. if my Layer Control toolbar in AutoCad displays Layer1, then this happens on my command-line:

Command: CLAYER
Enter new value for CLAYER <"Layer1">: 0
Command: CLAYER
Enter new value for CLAYER <"0">: Layer1
Command: (getvar 'CLayer)
"Layer1"
Command: (setvar 'CLayer "0")
"0"
Command: CLAYER
Enter new value for CLAYER <"0">:
Command: (setvar 'CLayer "Layer1")
"Layer1"
Command: CLAYER
Enter new value for CLAYER <"Layer1">:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...