Author Topic: Section Sheets Tool Needed  (Read 5046 times)

0 Members and 1 Guest are viewing this topic.

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Section Sheets Tool Needed
« on: August 24, 2008, 02:17:52 PM »
This probably should be in the Code Red section although I would really only be begging for someone to code a tool, I would be unable to contribe to the effort of. With that being said I will outline the task, and challenge and see what our friend SINC has for us.


In there infinitely limited vision autodesk, ignored the inclusion of a proper tool for placing our Group Plots of cross section within the "Plan Production Tools' of C3D. They gave us tools to perfrom plan, profile, and plan and profile options however they punted on Cross Sections sheets and there are a couple of suggested workarounds to this deficiency.


However there is hope, IF someone could code up a tool to read the Sheet border information of those "Sheet" objects that autodesk places in model space. Yes, I know they went backwards, they move us to plotting from Paperspace(layout tabs) and now give use sheet boundaries in model space as if this were Version 5.0 of autocad when one HAD to set up plot windows, or views in the drawings.
If one could extract the border coordinates of the Sheet objects, and save a view for each Sheet border area, then one could use the model views function of sheet set manager to drag those saved views onto layout tabs that one adds to the sheet set.  Personally I haven't a clue where to begin on this as stated, first the SHEET item is a C3D object, when one explodes the Sheet Object it is than an unnamed block, and then a second explode then exposes the border with usable coordinates suitable for using as the View definitions.

I think this function could be an excellent addition to the SINPAK3D toolset.
« Last Edit: August 25, 2008, 12:38:47 PM by mjfarrell »
Be your Best


Michael Farrell
http://primeservicesglobal.com/

scout

  • Guest
Re: Section Sheets Tool Needed
« Reply #1 on: August 25, 2008, 12:00:41 PM »
I've seen some folks use Map Books for this, but it does lack that civil 3d smarts.

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Section Sheets Tool Needed
« Reply #2 on: August 25, 2008, 12:38:11 PM »
I've seen some folks use Map Books for this, but it does lack that civil 3d smarts.

I am fully aware of the MAP books function, and using Fake alignments along the array of section sheets; so that one can employ the plan production tools.
From my perspective the Easiest way is to save views within the model and then drag those model views on to sheets using that function within Sheet Set Manager.
Give it a try Scout and you will see what I mean. It's effective other than needing to Manually define the views. And that is where the request for this function (tool) to automate the creation of those named views after the section sheet names; as C3D does at least name the Sheet Objects: Sheet 1, Sheet 2....

Be your Best


Michael Farrell
http://primeservicesglobal.com/

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Section Sheets Tool Needed
« Reply #3 on: August 25, 2008, 01:16:40 PM »
I've seen some folks use Map Books for this, but it does lack that civil 3d smarts.

Now that you work for autodesk, when are you going to get them address the lack of MAP compatibility that has been gone missing for 5 years now? Even you acknowledge this to be a serious deficiency, let's see what you get done about this.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

scout

  • Guest
Re: Section Sheets Tool Needed
« Reply #4 on: August 25, 2008, 01:56:41 PM »
From my perspective the Easiest way is to save views within the model and then drag those model views on to sheets using that function within Sheet Set Manager.

I like that tool as well. Its highly under used for sure.

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Section Sheets Tool Needed
« Reply #5 on: August 25, 2008, 04:16:12 PM »
From my perspective the Easiest way is to save views within the model and then drag those model views on to sheets using that function within Sheet Set Manager.

I like that tool as well. Its highly under used for sure.

That would be why I include that process in all of my classes when we discuss Sheet Set Manager.
The coolest part of all is that fact that it asks the user for and automatically adjust the size of the view for the required scale of the detail views. And why a tool that would reach inside the Sheet object, and get the border limits would be sweet to have.
I might just have to post this in the coding section; so that those folks might take a crack at it, even though I know I can't help much, other than supply the need and test it's operation.


Be your Best


Michael Farrell
http://primeservicesglobal.com/

Jeff_M

  • King Gator
  • Posts: 4099
  • C3D user & customizer
Re: Section Sheets Tool Needed
« Reply #6 on: August 25, 2008, 05:04:03 PM »
Michael,
I think this simple little lisp does what you are thinking of.

Code: [Select]
;;routine to create/update named views based on AECC_Sheets in the drawing. These sheets are those
;; created by the Create Multiple Views of Alignment Sections in C3D
;; by Jeff Mishler based on an idea for automation by Michael Farrell
;; August 25, 2008
(defun c:sheets2views (/ ss idx views ent obj ll lowerleft ur upperright view ctr height width)
  (if (setq ss (ssget "x" '((0 . "AECC_SHEET"))))
    (progn
      (setq idx -1
    views (vla-get-views (vla-get-activedocument (vlax-get-acad-object)))
    )
      (while (setq ent (ssname ss (setq idx (1+ idx))))
(setq obj (vlax-ename->vla-object ent))
(vla-getboundingbox obj 'll 'ur)
(setq lowerleft (vlax-safearray->list ll)
      upperright (vlax-safearray->list ur)
      name (vlax-get obj 'name)
      )
(setq view (vlax-invoke views 'add name))
(setq ctr (mapcar '/ (mapcar '+ lowerleft upperright) '(2.0 2.0))
      height (abs (- (cadr upperright) (cadr lowerleft)))
      width (abs (- (car lowerleft) (car upperright)))
      )
(vlax-put view 'center ctr)
(vlax-put view 'height height)
(vlax-put view 'width width)
)
      )
    )
  (princ)
  )
This will get the extents of the sheet. If the Border is set to be shown, that will be used. If just the PrintArea is set to display, that will be used. If something more robust is desired, I will need some more direction and a sample drawing with the desired results.
Jeff
« Last Edit: August 25, 2008, 05:07:32 PM by Jeff_M »

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Section Sheets Tool Needed
« Reply #7 on: August 25, 2008, 05:52:14 PM »
Thank you!

Given that this grabs all the section sheets in a drawing you will be a hero to quite a number of C3D users!
Be your Best


Michael Farrell
http://primeservicesglobal.com/

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Section Sheets Tool Needed
« Reply #8 on: August 25, 2008, 06:36:41 PM »
this is the results of the first test:


Identify section view origin: Section view created
Command: sheets2views
; error: no function definition: VLAX-GET-ACAD-OBJECT
 

:cry:

This could be why:


Command: li
LIST 1 found

                  AECC_SHEET  Layer: "XREF"
                            Space: Model space
                   Color: 1 (red)    Linetype: "BYLAYER"
                   Handle = 98b6

              Type : AeccImpSheet              Name : Sheet 1 of 21
       Description :
Parent :
             Style : Basic
Be your Best


Michael Farrell
http://primeservicesglobal.com/

FengK

  • Guest
Re: Section Sheets Tool Needed
« Reply #9 on: August 25, 2008, 06:44:41 PM »
Michael,

Try adding the following to the top of code from Jeff and see what happens.

(vl-load-com)

Kelie

Jeff_M

  • King Gator
  • Posts: 4099
  • C3D user & customizer
Re: Section Sheets Tool Needed
« Reply #10 on: August 25, 2008, 06:45:53 PM »
No, that's because I refuse to always add that which must be added to my lisps.....add
(vl-load-com)
to the very beginning of the lisp and it should be fine. You'd think that would be automatic for me by now, but since that line is in my acad.lsp file I ALWAYS forget to add it to code I post.....sorry about that.

Thanks xycadd...who is that masked cadder?????

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Section Sheets Tool Needed
« Reply #11 on: August 25, 2008, 07:46:04 PM »
Michael,

Try adding the following to the top of code from Jeff and see what happens.

(vl-load-com)

Kelie

Thank you Kelie!

You are a LISP Scholar and a Prince :wink:

Your schedule is on the way 10052008-10182008, I just got the word.
« Last Edit: August 25, 2008, 07:54:08 PM by mjfarrell »
Be your Best


Michael Farrell
http://primeservicesglobal.com/

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Section Sheets Tool Needed
« Reply #12 on: August 25, 2008, 07:55:18 PM »
No, that's because I refuse to always add that which must be added to my lisps.....add
(vl-load-com)
to the very beginning of the lisp and it should be fine. You'd think that would be automatic for me by now, but since that line is in my acad.lsp file I ALWAYS forget to add it to code I post.....sorry about that.

Thanks xycadd...who is that masked cadder?????


See...I said I wouldn't be much help.    :angel:
Be your Best


Michael Farrell
http://primeservicesglobal.com/

FengK

  • Guest
Re: Section Sheets Tool Needed
« Reply #13 on: August 26, 2008, 02:54:02 AM »
Thank you Kelie!

You're welcome Michael.

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Thanks for the Section Sheets Tool !
« Reply #14 on: August 26, 2008, 11:49:22 AM »
And thanks for probably the best gift, your simple, un-commented code actually helped me SEE lisp in a whole new light.
Granted, I just never applied much of it, I have studied yours, and it I can nearly follow it all.
Be your Best


Michael Farrell
http://primeservicesglobal.com/