Author Topic: Inserting a drawing with a lisp  (Read 1905 times)

0 Members and 1 Guest are viewing this topic.

Luke

  • Guest
Inserting a drawing with a lisp
« on: February 26, 2008, 09:02:52 AM »
I have a lisp file that is in my startup suite.  It load all my support lisps and now I think I want to make it load some support drawings.  Having trouble with that.

(command "insert" "LCC_Annotation.dwg")  :|

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Inserting a drawing with a lisp
« Reply #1 on: February 26, 2008, 09:26:33 AM »
Short on time, but you should not use COMMAND in the start up.
Else look at this:
Code: [Select]
(setq sysattdia (getvar "ATTDIA"))
(setq sysattreq (getvar "ATTREQ"))
(setq systxteva (getvar "TEXTEVAL"))
(setvar "ATTDIA" 0)
(setvar "ATTREQ" 0)
(setvar "TEXTEVAL" 0)


    (command "-insert" bname "0,0,0" "1.0" "" "0.0" )


(setvar "ATTDIA"   sysattdia)
(setvar "ATTREQ"   sysattreq)
(setvar "TEXTEVAL" systxteva)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

rkmcswain

  • Swamp Rat
  • Posts: 978
Re: Inserting a drawing with a lisp
« Reply #2 on: February 27, 2008, 08:22:12 AM »
As CAB says, the (command) function will generally not work in a startup lisp.

It needs to be defined in the S::STARTUP function.

Details on all of this are in the Customization Guide

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Inserting a drawing with a lisp
« Reply #3 on: February 27, 2008, 08:31:35 AM »
why not insert that dwg into the appropriate DWT?
Be your Best


Michael Farrell
http://primeservicesglobal.com/

Luke

  • Guest
Re: Inserting a drawing with a lisp
« Reply #4 on: February 27, 2008, 11:30:35 AM »
I can and will be putting it in my template. 

However, I want it to be availabe for use in old drawings.  My template is brand new and only use when starting a new drawing.  But if going into an existing drawing I want this LCC_Annotation.dwg to load into the old drawings.