Announcements

Announcement: We’re aware of an issue affecting starting a new topic from category pages and creating new blog posts. New topics can still be started directly from the relevant board. Learn more here.

Edit Sheet and Renumber/Revise Ladder through C#

Edit Sheet and Renumber/Revise Ladder through C#

mcoH3VZV
Advocate Advocate
651 Views
1 Reply
Message 1 of 2

Edit Sheet and Renumber/Revise Ladder through C#

mcoH3VZV
Advocate
Advocate

In my typical autocad template drawing, the sheet number is 101 with two columns 00-39 for lines 10100 through 10139.  I want to be able to programmatically change the sheet and revise the ladder. I was able to search and find the WD_M block and change the sheet attribute. However, this does not revise the ladder. Is there a simple ACAD API function that renumbers the ladder, or is there a better way of doing this as a whole via a program?

 

Thanks,

0 Likes
Accepted solutions (1)
652 Views
1 Reply
Reply (1)
Message 2 of 2

mcoH3VZV
Advocate
Advocate
Accepted solution

The answer is to search and find the WD_M block first and edit only that block. Change the Sheet attribute to whatever it needs to be.  Then, run this command:

 

doc.SendStringToExecute("(command (c:wd_ladr_reref)) ", true, false, false);

 

This will re-number the ladder based on the sheet you changed it to.

0 Likes