Need a Lisp to Create Named Views - Anyone Available to Put Something Together?

Need a Lisp to Create Named Views - Anyone Available to Put Something Together?

timothy_crouse
Collaborator Collaborator
3,888 Views
20 Replies
Message 1 of 21

Need a Lisp to Create Named Views - Anyone Available to Put Something Together?

timothy_crouse
Collaborator
Collaborator

Hello Programmers

 

I am in need of a lisp to create named views. 

I use named views in my workflow to link parts bubbles to sheetset views (which are defined via named views).

 

I would like to be able to have a starting and ending defined view name fed into teh lisp, at which point the lisp would create the start and end named views along with all the named views in between.

 

For Example

Starting Defined Name Would Be"FN-001"

Ending Defined Named View Would Be "FN-321"

 

The lisp would then create named views from FN-001 thru FN-321

 

The boundary would be the entire sheet

The Defined named View "Category"  Would also need to be input, something like "Mechanical Components"

 

A lisp to delete defined named views in a ranged as described would be useful too.

 

Thoughts / Comments?

Thanks in Advance

-Tim C.

0 Likes
3,889 Views
20 Replies
Replies (20)
Message 2 of 21

rkmcswain
Mentor
Mentor

You might also ask over at the Swamp.

R.K. McSwain     | CADpanacea | on twitter
0 Likes
Message 3 of 21

patrick.emin
Alumni
Alumni

Hi @timothy_crouse though this is not exactly what you are after, this LISP can probably help you with a bit of tweaking.


Patrick Emin animateur de la communauté francophone


Vous avez trouvé un message utile? Alors donnez un "J'aime" à ce message!
Votre question a eu une réponse satisfaisante? Voulez vous avoir l'amabilité de cliquer sur le bouton
 APPROUVER LA SOLUTION  en bas de la réponse qui apporte une solution?
Signez notre Livre d'Or
0 Likes
Message 4 of 21

CGBenner
Community Manager
Community Manager

@timothy_crouse 

 

Hi, Timothy.  Thanks for posting!  Looks like you're getting some suggestions here.  When you do find the code that works for you, would you mind sharing it here in this thread?  That way, later on, someone else might be able to find it by searching the forums or Google.  Thanks in advance!  😀

Did you find a post helpful? Then feel free to give likes to these posts!
Did your question get successfully answered? Then just click on the 'Accept solution' button.  Thanks and Enjoy!


Chris Benner
Community Manager

Message 5 of 21

timothy_crouse
Collaborator
Collaborator

Will Do

Message 6 of 21

CodeDing
Advisor
Advisor

@timothy_crouse ,

 

How familiar are you with AutoLISP? Can you accomplish this yourself perhaps? Or are you needing someone to create some code for you?

 

Named Views are stored in the VIEW Symbol table. We can see that "VIEW" is one of our tables to access here.

A view can be created via entmake (or entmakex). Here are some VIEW DXF Code values.

 

After the View is created, you can retrieve the View entity w/ the tblobjname function. Then you can also Set the view to current with the setview function.

 

Best,

~DD

Message 7 of 21

timothy_crouse
Collaborator
Collaborator

Really good input,  I was hoping to take the lazy way out on this one :).

If it comes to the point of me doing it myself I will start with you input.  

 

Thank You

-Tim C.

 

 

 

Message 8 of 21

maratovich
Advisor
Advisor

 

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 9 of 21

maratovich
Advisor
Advisor

 

 
 
 
 
 
 
 
 
 
 
 
 
---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 10 of 21

maratovich
Advisor
Advisor

https://autode.sk/3gDXRWP

https://screencast.autodesk.com/Embed/Timeline/34cf71f8-c91f-41f2-8bf8-0108a42b8e7c

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 11 of 21

timothy_crouse
Collaborator
Collaborator

The request is for Named Views, Not View Port Creation

 

Thanks

Tim

0 Likes
Message 12 of 21

maratovich
Advisor
Advisor

@timothy_crouse wrote:

The request is for Named Views, Not View Port Creation

 

Thanks

Tim


Have you watched the video?
Named views are created.

If you cannot watch the video, attach an example of what you need.

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 13 of 21

pbejse
Mentor
Mentor

@timothy_crouse wrote:

...

For Example

Starting Defined Name Would Be"FN-001"

Ending Defined Named View Would Be "FN-321"

 

The lisp would then create named views from FN-001 thru FN-321

..

The Defined named View "Category"  Would also need to be input, something like "Mechanical Components"


 

Curious, is that 1 file with multiple tabs? 1 named view per tab? or multiple files with 1 named view per drawing?

 

 

0 Likes
Message 14 of 21

timothy_crouse
Collaborator
Collaborator

The goal is to create multiple named views on the current layout.

 

I was going to ask if anyone had a lisp that would read the named view list from a CSV file then create all the named views in the list.  Seems like it might be simpler than dealing with incrementing names suffix(s) in a lisp.

 

Thanks

-Tim C.

0 Likes
Message 15 of 21

maratovich
Advisor
Advisor

@timothy_crouse wrote:

The goal is to create multiple named views on the current layout.


Add an example of your file.

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 16 of 21

timothy_crouse
Collaborator
Collaborator

here is an example of creating named views from alist.

 

1. Create the named view(s)

2.  Rename the named Views

3.  Delete a few of the named views

4. Rename the remaining named views.

 

The named views are used to create sheet views in a sheet set manager

I then drop Find Bubbles throughout the package which has the find number linked to the sheet set sheet view, which was pushed to the sheet set via the drawing named view creation.

 

Clear as mud right 🙂

 

Thanks

Tim

0 Likes
Message 17 of 21

maratovich
Advisor
Advisor

Add an example of your REAL DWG file.

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 18 of 21

timothy_crouse
Collaborator
Collaborator

The attached dwg in the last reply is an actual file from a project.

 

If you bring up the named view manager you will see ALL the named views.

 

-Tim C.

0 Likes
Message 19 of 21

maratovich
Advisor
Advisor

Your dwg file does not contain an example.

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 20 of 21

timothy_crouse
Collaborator
Collaborator

I am not tracking your response.

 

What do you expect to see for an example?

 

What I provided is an example of what I am trying to manage through a lisp that can mange NAMED VIEWS.

 

What I do not understand about the app you displayed in the video is that seems to be dealing with viewports and layouts not named views.

 

Am I missing something as NAMED VIEWS are neither a layout nor a vport.  But can be created to apply a name to a layout or a vport.

 

-Tim C.

0 Likes