TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: cmwade77 on March 07, 2012, 12:34:10 PM
-
Ok, so here is the deal, I need to get all layout names in a drawing and cycle through them, without using any of the following:
VLA or VLAX commands
LayoutList
VB.Net is acceptable, as long as I can use it in a stand alone .EXE file without AutoCAD running.
Any ideas would be greatly appreciated.
-
(defun _getlayouts
( / lst
) )
)
)
:?
-
(defun _getlayouts
( / lst
) )
)
)
:?
Thank you Lee...this works perfectly for what I am working on. I honestly couldn't think of how to approach this, I prefer the vlax methods, but I need to build something that works across platforms (MAC & PC) without using the nice (layoutlist) function.
-
You're welcome :-) I was confused as to the restrictions you imposed, but that makes sense :-)
-
Another :-)
(defun c:TesT (/ names)
(mapcar (function (lambda (x)
(if (eq (car x) 3)
(setq names (cons (cdr x) names))
)
)
)
(dictsearch (namedobjdict) "ACAD_LAYOUT")
)
(print (reverse names))
(princ)
)
-
Ok, so here is the deal, I need to get all layout names in a drawing and cycle through them, without using any of the following:
VLA or VLAX commands
LayoutList
VB.Net is acceptable, as long as I can use it in a stand alone .EXE file without AutoCAD running.
Any ideas would be greatly appreciated.
try this windows forms project just for your interest
Tested on A2009 Win7 Framework 3.0
Be patience works slowly
~'J'~
-
Ok, so here is the deal, I need to get all layout names in a drawing and cycle through them, without using any of the following:
VLA or VLAX commands
LayoutList
VB.Net is acceptable, as long as I can use it in a stand alone .EXE file without AutoCAD running.
Any ideas would be greatly appreciated.
try this windows forms project just for your interest
Tested on A2009 Win7 Framework 3.0
Be patience works slowly
~'J'~
Thank you, but the key portion was to not open AutoCAD as I am trying to make my routine run faster and opening AutoCAD slows it down dramatically.
To that end, does anyone have an ideas on how the following code can be sped up?
(if (= (getvar "pstylemode") 1) (setq pMode "Civil.ctb") (setq pmode "PDF & DWF.stb"))
(foreach pair (dictsearch (namedobjdict) "ACAD_LAYOUT")(if (= 3 (car pair))(if (/= (strcase (cdr pair)) "MODEL")(progn (command "layout" "S" (cdr pair))
(command "-plot" "Y" "" "DWG to PDF.pc3" "ARCH expand E1 (30.00 x 42.00 Inches)" "inches"
"Landscape"
"N"
"Extents"
"1:1"
"CENTER"
"Y"
pmode
"Y"
"Y"
"N"
"N"
(strcat "H:\\Projects\\117 Small Projects 11\\11-005 N. Sycamore Drive\\Sent\\PDF\\2012-03-07\\M-0.1 MECHANICAL GENERAL NOTES SYMBOLS LEGEND & SHEET INDEX_" (cdr pair) ".pdf")
"N"
"Y"
)))))
Again, with the same restrictions as at the beginning of this thread.
-
If you can't open AutoCAD, .NET is completely out of the picture.
-
If you can't open AutoCAD, .NET is completely out of the picture.
Not completely, see this article:
http://through-the-interface.typepad.com/through_the_interface/2012/02/the-autocad-2013-core-console.html
Combining this with scripts and .NET, you should be able to come up with some very creative tools that run considerably faster than what you can do as of right now, at least that is my guess based on how much faster they claim it opens than the traditional full version of AutoCAD.
-
OK, if you want to be nit-picky. :grazy: Still running AutoCAD though, just without the UI.
-
OK, if you want to be nit-picky. :grazy: Still running AutoCAD though, just without the UI.
True, but, much, much faster, just more limited.
Honestly, the above works great for my needs.
-
If you can't open AutoCAD, .NET is completely out of the picture.
Not completely, see this article:
http://through-the-interface.typepad.com/through_the_interface/2012/02/the-autocad-2013-core-console.html (http://through-the-interface.typepad.com/through_the_interface/2012/02/the-autocad-2013-core-console.html)
Combining this with scripts and .NET, you should be able to come up with some very creative tools that run considerably faster than what you can do as of right now, at least that is my guess based on how much faster they claim it opens than the traditional full version of AutoCAD.
But then
Thank you Lee...this works perfectly for what I am working on. I honestly couldn't think of how to approach this, I prefer the vlax methods, but I need to build something that works across platforms (MAC & PC) without using the nice (layoutlist) function.
For now that officially puts .NET completely out of the picture.
-
If you can't open AutoCAD, .NET is completely out of the picture.
Not completely, see this article:
http://through-the-interface.typepad.com/through_the_interface/2012/02/the-autocad-2013-core-console.html (http://through-the-interface.typepad.com/through_the_interface/2012/02/the-autocad-2013-core-console.html)
Combining this with scripts and .NET, you should be able to come up with some very creative tools that run considerably faster than what you can do as of right now, at least that is my guess based on how much faster they claim it opens than the traditional full version of AutoCAD.
But then
Thank you Lee...this works perfectly for what I am working on. I honestly couldn't think of how to approach this, I prefer the vlax methods, but I need to build something that works across platforms (MAC & PC) without using the nice (layoutlist) function.
For now that officially puts .NET completely out of the picture.
Not entirely, now that I have the script right (this is the part that I need to work cross platform), it's just building out the interface, which is what I am using .NET for on the PC (mostly because it is what I know), then making a similar interface on the Mac shouldn't be too hard.
-
I just meant for working across platforms.
Cocoa (http://en.wikipedia.org/wiki/Cocoa_(API))for the mac maybe?