.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fill -> Import -> Insert Block with a Windows standard form

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
441 Views, 6 Replies

Fill -> Import -> Insert Block with a Windows standard form

Hi at all guy,

I'am a new developer of Api .net Autocad 2009 and I write this thread about expose a particular question:


I want to know if is correct this procedural mechanism to import an external dwg block into an planimetric dwg of an Hospital Build:

1 - Implement the command IMPORTBLOCK to import the (and only one!!!) block from a external dwg (container blocks) into planimetric dwg
following this example http://through-the-interface.typepad.com/through_the_interface/2006/08/import_blocks_f.html

2- insert a block with a command named INSERTBL where U can select the point angle and scalar of this
following this example of this post http://discussion.autodesk.com/forums/thread.jspa?messageID=6107709� (very very good!!)

3- command ATTSYNC to syncronize attribute set ON for visible video (editor)

4- handler for a form application with fill custom attributes of the target block before to insert into
This handler execute sequencialy this three command follow this order to execute IMPORTBLOCK INSERTBL ATTSYNC.
The handler is universally recognize for any input external program


My question is: Why I try to import correctly a block very filled (I see to debugging) from external dwg and I execute a well formed insert into planimetric dwg without error with ATTSYNC in finally the block is not visible? the zoom nothing!! in block list nothing!!
What's my error in my procedure? 😞

thanks in advance for your replies

ale

Edited by: alessandro.modica on Feb 4, 2009 11:48 PM Edited by: alessandro.modica on Feb 4, 2009 11:53 PM
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

Welcome,



Hang on for dear life, because this place can be turbulent at times...



In Kean's example he does not commit the transaction, tr.commit, instead he only disposes it. That would be one reason why. The other is the block is not added to the transaction, tr.addnewlycreatedobject. Therefore everything his example does is temporary. Transactions are the heart of accessing AutoCAD's database. Everything you do in a transaction is the 'safe' method of talking to the database so that if something goes wrong it can be backed out (undo). Take some time to get to know transactions, so that you can continue with confidence.



jvj
Message 3 of 7
Anonymous
in reply to: Anonymous

hi jamie,

Today I made a general verify of the alghoritmic system!

And I see that an insertion it's been without error and block visible after insert the commit that you describe.

I know that the error is little 🙂 ...but is very very hidden :|!

About transaction I see that the approch of Autocad is a database style and all entity is thread as a field in a table (ad example blocktable).

You are very useful about explain some method (ad example tr.addnewlycreatedobject) that I think a logical procedure and now is all more

About strange method: what's use of couple method UpgradeOpen() DowgradeOpen() ?

Tomorrow I will know more and more 🙂

good tonight and thanks for all

ale
Message 4 of 7
Anonymous
in reply to: Anonymous

UpgradeOpen and DownGrade Open are for entities that have been 'checked out' of the database. It allows you to change the check out status. Objects can be opened for 'read', 'write', and 'notify' these commands allow you to change the statuse without checking them back in. You need the ObjectARX Development Guide (2009 is best so far when it comes to explainations) if you don't already have it.



jvj
Message 5 of 7
Anonymous
in reply to: Anonymous

ok!! very cool!
ObjectARX Development guide I know and in this three days I prefer to search some example and play with tuning!

Now I want to know the "slang" of Autocad so I consult very fast the guide so fast receive a correctly response.

programming on Autocad is very enjoy but the message error and some innerexception well describe is more and more enjoy!!

I read on forum and in various thread the concept of "Dynamic Block and/or Dynamic Attribute"...what's dynamic? an on the fly approch to change information databaseless ?
Message 6 of 7
Anonymous
in reply to: Anonymous

I don't know where Jamie is getting that from, but there is
no such thing as 'check in/check out' status.

UpgradeOpen() and DowngradeOpen() change the open
state of an object between OpenMode.ForWrite/ForRead.

If an object was acquired using GetObject() and the mode
argument was OpenMode.ForRead, you can't modify the
object unless you first call UpgradeOpen().

You can then return the object to a read-only state by calling
DowngradeOpen().

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009
http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


wrote in message news:6119384@discussion.autodesk.com...
ok!! very cool! ObjectARX Development guide I know and in this three days I
prefer to search some example and play with tuning! Now I want to know the
"slang" of Autocad so I consult very fast the guide so fast receive a
correctly response. programming on Autocad is very enjoy but the message
error and some innerexception well describe is more and more enjoy!! I read
on forum and in various thread the concept of "Dynamic Block and/or Dynamic
Attribute"...what's dynamic? an on the fly approch to change information
databaseless ?
Message 7 of 7
Anonymous
in reply to: Anonymous

...and so I setting a getobject in status write UpgradeOpen() is redudant and Downgrade() restrict the permission in status only read and viceversa.
Thank's very much about this information! I have a more and more cleary understand some programming conditions.

see U

ale

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost