Automation of plans with dimensions from a 3D model

Automation of plans with dimensions from a 3D model

teitab
Explorer Explorer
746 Views
7 Replies
Message 1 of 8

Automation of plans with dimensions from a 3D model

teitab
Explorer
Explorer

Good morning, my friends.

 

I have been trying for days to automate the generation of plans from various 3D drawings with VBA (for example, a wooden chair that has 18 pieces, generating the plan with dimensions of each piece with different views) but I am stuck with the use of the VIEWBASE command to get the isometric of the piece with 4 views, I cannot automate it, could you help me with some guidance on the correct code or some solution for what I want to achieve?

I remain attentive, friends. Greetings!

0 Likes
747 Views
7 Replies
Replies (7)
Message 2 of 8

Ed__Jobe
Mentor
Mentor

Interesting question, but you can't automate the VIEWBASE command with VBA. There isn't a command line version either. I haven't found out yet what type of object the views are. If you select one, the Properties dialog calls it a "Drawing View", but this doesn't come up in an api search. I don't have much time to spend on this but if you are going to have any chance of automating this, it will be with .NET.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 3 of 8

teitab
Explorer
Explorer

Hi friend, thanks a lot for answering. This topic has been driving me crazy for days! The type of entity that are the views that are placed in the layouts with the VIEWBASE command are AcDbViewBorder but I can't dimension each line they have with code because as such they are a set and I can't find a way to do it. I don't know how to program in .NET, do you really think I can do it like that? In my company I have to make approximately 10,000 plans, it's taking me quite a while to find the solution to do it with programming, I've been watching several videos that use python - Pyautocad and they perform several fairly good actions to dimension but in none of them do they include that command. It may not even be with that command:

What I'm trying to do is to make a for loop for each 3D solid I have in my SpaceModel, create a new layout with an input box that asks for the name of the solid, place 3 to 4 views in that layout for each solid and dimension each line of each view for each figure, so that the procedure becomes automatic and continuous, that is, if I have 18 pieces, at the end of the execution I should have 18 layouts, each one with its names of the figures, with 3 or 4 views for each layout and all the views with their dimensioned lines. I know that it is a rather greedy project on my part, but it is the only way that I will be able to have the 10,000 plans in the stipulated time.

I continue to pay attention to the community forums, my friend, I hope to have some guidance and perhaps 2 options to be able to achieve my goal. Thank you very much for answering. Greetings!

0 Likes
Message 4 of 8

Ed__Jobe
Mentor
Mentor

Are you generating the 3D model too? What kind of model, acad or Inventor? or something else?

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 5 of 8

teitab
Explorer
Explorer

I create the 3D model of each chair based on some photographs that are sent to me by email, I add some standard measurements after looking at the photographs and finally I design the chair or furniture in AutoCAD for mass production. The for loop is only used to recognize each figure already created in the SpaceModel and to generate all the views and other elements of it... well, at least thats the goal. 🙂

0 Likes
Message 6 of 8

Ed__Jobe
Mentor
Mentor

I'm sorry, I don't think I can be of much help.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 7 of 8

teitab
Explorer
Explorer

OH noo :(... maybe just with the autodim in VBA with a for loop for each 3d figure? I could use another tactic trying with the viewport and view config by x y & z points. At least with a good .NET course for AutoCAD haha :')... Even I'm thinking with Excel... anything? :'x

0 Likes
Message 8 of 8

Ed__Jobe
Mentor
Mentor

Maybe if you posted a sample dwg? And I highly recommend that you don't introduce xl. It will just slow things down working from outside acad.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes