Author Topic: Layer states in Lisp not working  (Read 2047 times)

0 Members and 1 Guest are viewing this topic.

BudRPerry

  • Guest
Layer states in Lisp not working
« on: January 27, 2016, 10:21:26 AM »
So I'm following examples in the AutoCad help and the Layerstates-import nor the layerstates-importfromdb don't work.

The format according to AutoDesk is:
(layerstate-import "u:\Autocad\layer states\ST.las")  but I just get the nil result because it doesn't actually import the state.

If I try to pull the layerstate from a drawing:
(layerstate-importfromdb "ST" "u:\autocad\layer states\layerstates.dwg")  I get  ; error: ADS request error

grrr...aargh....

BudRPerry

  • Guest
Re: Layer states in Lisp not working
« Reply #1 on: January 27, 2016, 10:26:46 AM »
I just redid this with a more local source (putting it on a flash drive) and it worked...so there must be a problem with the path even though this is exactly what Windows says is the right location.  We don't get access to our C: drives, the U: drive is where everyone has equal access to...

ymg

  • Guest
Re: Layer states in Lisp not working
« Reply #2 on: January 27, 2016, 10:47:47 AM »
Bud,

When you export your layerstate with command "LAYERSTATE", it informs you of the path
where it is stored.

On my system they go to c:\my documents

Maybe your IT send it to a special drive.  You could check where by exporting a test file,
and see where it gets send.

ymg

BudRPerry

  • Guest
Re: Layer states in Lisp not working
« Reply #3 on: January 27, 2016, 11:16:51 AM »
We are simply not allowed to access our C: drives.  When I export using Layerstate it goes to the u:\autocad\layer states\    folder...but evidently autocad doesn't like it when in lisp form...

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Layer states in Lisp not working
« Reply #4 on: January 27, 2016, 11:39:40 AM »
Try something like this:
Code - Auto/Visual Lisp: [Select]
  1. (layerstate-import "u:\\Autocad\\layer states\\ST.las")
Note the double back slash.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

ymg

  • Guest
Re: Layer states in Lisp not working
« Reply #5 on: January 27, 2016, 12:11:06 PM »
ronjomp,

Wonder in which of the many path files in options we could put it?

ymg

BudRPerry

  • Guest
Re: Layer states in Lisp not working
« Reply #6 on: January 27, 2016, 01:08:53 PM »
I tried the double backslashes - nope, still get the ADS request error. 
Programming is hard.

BudRPerry

  • Guest
Re: Layer states in Lisp not working
« Reply #7 on: January 27, 2016, 01:36:03 PM »
OMG, I switched the backslashes for forward slashes....and it worked!