Jump to content

Recommended Posts

Posted

Right...

 

Perhaps someone can help me with this...

 

I'm trying to create a series of shortcuts via Lisp Routines to insert a deseried block upon command. I dont need it to scale upon insert, just with 'Pick Point on Screen' With unform scale at 1,1,1.

 

(defun c:LVL( / )
(command "INSERT" "Z:\CAD Systems\CAD Block List\HPS_Level.dwg")
)
(princ)

 

Does .LSP not allow for back slashes?

 

"CAD SystemsCAD Block ListHPS_Level.dwg": Can't find file in search

 

:?

Posted

try with forward slashes or double backslashes instead.

Posted

A single backslash is used to pass a escape character, such as the newline character: "\n" or tab: "\t", hence, if you need to pass a backslash, you need to mark it as a literal using another backslash: "\\".

 

So the path would be:

 

(defun c:LVL ( / )
 (command "_.-INSERT" "Z:\\CAD Systems\\CAD Block List\\HPS_Level.dwg")
)
(princ)

Posted

Nice!

 

How can i use the below values in this lisp routine?

 

Unit-scaling inserted database...

Units: Millimeters Conversion: 1.0000

Specify insertion point or [basepoint/Scale/X/Y/Z/Rotate]: nil

Specify insertion point or [basepoint/Scale/X/Y/Z/Rotate]:

Enter X scale factor, specify opposite corner, or [Corner/XYZ] :

Enter Y scale factor :

Specify rotation angle :

Posted

Include a 'pause':

 

(defun c:LVL ( / )
 (command "_.-INSERT" "Z:\\CAD Systems\\CAD Block List\\HPS_Level.dwg" pause "" "" "")
 (princ)
)

Posted

You're just too good at this :F

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...