ObjectARX

ObjectARX

Reply
Moderator
1,464 Posts
277 Kudos
Registered: ‎04-09-2008
Post 11 of 14

Re: how to change the value of user variable of autocad2010

02-21-2013 02:29 AM in reply to: zhangxinhua789

Ok. I've tested my code from post 4 and it do it the same you ask me.

1. Compile and build arx-file with code I've posted.

2. Start AutoCAD and load arx-file into AutoCAD.

3. Starting command ADDASSOCVAR and you see how line changed.

Command: ADDASSOCVAR
Variable name: user1
Variable expression: 100

So before command:

21-02-2013 12-24-26.png

 

And after command:

21-02-2013 12-26-46.png

 

 


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

Active Contributor
32 Posts
0 Kudos
Registered: ‎01-29-2013
Post 12 of 14

Re: how to change the value of user variable of autocad2010

02-26-2013 05:28 PM in reply to: zhangxinhua789

Thank you very much! It's very kind of you.you are my mentor.

Regards

Active Contributor
32 Posts
0 Kudos
Registered: ‎01-29-2013
Post 13 of 14

Re: how to change the value of user variable of autocad2010

02-26-2013 07:27 PM in reply to: Alexander.Rivilis

 

 

 

 

Hello,experts
  I have a new question,I want to know how to use the Dynamic Blocks in objectarx2010. I define a Dynamic Block in autocad2010,Now I want to insert the Dynamic Block in a dwg-file,can you tell me the code?Thank you very much!

  this is a screenshot of the Dynamic Blocks,I want to insert the Dynamic Block in the position(x=50,y=50),and I want change the three dimensions:
before command:they are d1=48;d2=96;d3=43
after  command:they are d1=98;d2=150;d3=70

I think the class of AcDbDynBlockReference is useful,but I don't know how to use it.Can you help me?

Active Contributor
32 Posts
0 Kudos
Registered: ‎01-29-2013
Post 14 of 14

Re: how to change the value of user variable of autocad2010

02-26-2013 11:25 PM in reply to: Alexander.Rivilis

Hello,experts
I have a new question,I want to know how to use the Dynamic Blocks in objectarx2010. I define a Dynamic Block in autocad2010,Now I want to insert the Dynamic Block in a dwg-file,can you tell me the code,Thank you very much!

this is a screenshot of the Dynamic Blocks,I want to insert the Dynamic Block in the coordinate position(x=50,y=50),and I want change the three dimensions:
before command:they are d1=48;d2=96;d3=43
after  command:they are d1=98;d2=150;d3=70

And I have attached this dwg-file in my post in order to you can test your code with it(I have

defined the the Dynamic Block,its name is a;you can try to insert it in autocad2010).
I think the class of AcDbDynBlockReference is useful,but I don't know how to use it.Can you help me?

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post