ObjectARX

Reply
Moderator
Alexander.Rivilis
Posts: 1,346
Registered: ‎04-09-2008
Message 11 of 14 (193 Views)

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
Posts: 32
Registered: ‎01-29-2013
Message 12 of 14 (150 Views)

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
Posts: 32
Registered: ‎01-29-2013
Message 13 of 14 (142 Views)

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
Posts: 32
Registered: ‎01-29-2013
Message 14 of 14 (136 Views)

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?

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
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

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

Ask the Community