.NET

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

Creating new drawing file.

320 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

 

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 -

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

*Expert Elite*
Alfred.NESWADBA
Posts: 9,216
Registered: ‎06-29-2007
Message 2 of 5 (319 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: 88
Registered: ‎02-28-2012
Message 3 of 5 (318 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: 9,216
Registered: ‎06-29-2007
Message 4 of 5 (311 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,432
Registered: ‎04-09-2008
Message 5 of 5 (310 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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.