.NET

Reply
Valued Contributor
RamanSBV
Posts: 86
Registered: ‎02-28-2012
Message 1 of 5 (302 Views)
Accepted Solution

Creating new drawing file.

302 Views, 4 Replies
04-22-2012 11:59 PM

Hi,

 

How I can create new drawing(.dwg) file using drawing template(.dwt)file in back end (Means with out showing in front end).

 

Thanks in advance...

 

Regards,

Rama

 

*Expert Elite*
Alfred.NESWADBA
Posts: 8,895
Registered: ‎06-29-2007
Message 2 of 5 (301 Views)

Re: Creating new drawing file.

04-23-2012 12:04 AM in reply to: RamanSBV

Hi,

 

if you want to create a new database (so you don't open it in the AutoCAD-Editor) you can use:

Public Sub New(buildDefaultDrawing As Boolean, noDocument As Boolean)
     Member von Autodesk.AutoCAD.DatabaseServices.Database

 

HTH, - alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Valued Contributor
RamanSBV
Posts: 86
Registered: ‎02-28-2012
Message 3 of 5 (300 Views)

Re: Creating new drawing file.

04-23-2012 12:08 AM in reply to: Alfred.NESWADBA

Thanks for your response...

 

 

Please tell me how can use tempalate in this statement

 

Regards,

Raman

*Expert Elite*
Alfred.NESWADBA
Posts: 8,895
Registered: ‎06-29-2007
Message 4 of 5 (293 Views)

Re: Creating new drawing file.

04-23-2012 12:15 AM in reply to: RamanSBV

Hi,

 

>> Please tell me how can use tempalate in this statement

You can insert your template (or parts of it) in the new database (using WBLOCKCLONEOBJECTS or simililar funcionality).

You can also create a new database and do then DatabaseObj.ReadDwgFile to get the template-data into the new database-object and then -SaveAs to a new DWG.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Moderator
Alexander.Rivilis
Posts: 1,398
Registered: ‎04-09-2008
Message 5 of 5 (292 Views)

Re: Creating new drawing file.

04-23-2012 12:24 AM in reply to: RamanSBV

db.ReadDwgFile("<path to template file>",...)


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community