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

Selection Set Filter

7 REPLIES 7
Reply
Message 1 of 8
pellacad
415 Views, 7 Replies

Selection Set Filter

I am trying to collect all the dimensions in my -refedit session...

My code follows...

---snip---

Dim ssetObj As AcadSelectionSet

ssetObj = objAcad.SelectionSets.Add("SS1")

ssetObj.Select(AcSelect.acSelectionSetA ll, , , "0", "DIMROTATED")

Dim S1 As AcadDimRotated

For Each S1 In ssetObj
MsgBox(S1)
Next S1

---snip---

It seems pretty simple...can anyone see what's going wrong or maybe have a better way?

All cards and letters appreciated!


I solved my earlier REFEDIT open and closing issues by using the following code (in case anyone can use it)...

objAcad.ActiveDocument.SendCommand("(setq EN1 (entlast)) ")

objAcad.ActiveDocument.SendCommand("(command ""-refedit"" & ""(cadr EN1)"" & vbCr & ""ok"" & vbCr & ""a"" & vbCr & vbCr) ")

DimStyleAdjust() '<-- THIS IS THE SUB WHERE I NEED TO PUT MY DIMENSION SELECTION SET STUFF

objAcad.ActiveDocument.SendCommand("(command ""refclose"" ""S"") ")


ROCK ON...TALK 'ATCHA LATER...keep those cards and letters coming!
7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: pellacad

You're using VB.NET with the ActiveX API.

You will get more help in the VBA newsgroup.

--
http://www.caddzone.com

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

wrote in message news:5895723@discussion.autodesk.com...
I am trying to collect all the dimensions in my -refedit session...

My code follows...

---snip---

Dim ssetObj As AcadSelectionSet

ssetObj = objAcad.SelectionSets.Add("SS1")

ssetObj.Select(AcSelect.acSelectionSetA ll, , , "0", "DIMROTATED")

Dim S1 As AcadDimRotated

For Each S1 In ssetObj
MsgBox(S1)
Next S1

---snip---

It seems pretty simple...can anyone see what's going wrong or maybe have a better way?

All cards and letters appreciated!


I solved my earlier REFEDIT open and closing issues by using the following code (in case anyone can use it)...

objAcad.ActiveDocument.SendCommand("(setq EN1 (entlast)) ")

objAcad.ActiveDocument.SendCommand("(command ""-refedit"" & ""(cadr EN1)"" & vbCr & ""ok"" & vbCr & ""a"" & vbCr & vbCr) ")

DimStyleAdjust() '<-- THIS IS THE SUB WHERE I NEED TO PUT MY DIMENSION SELECTION SET STUFF

objAcad.ActiveDocument.SendCommand("(command ""refclose"" ""S"") ")


ROCK ON...TALK 'ATCHA LATER...keep those cards and letters coming!
Message 3 of 8
Anonymous
in reply to: pellacad

i seriously doubt it since vba developers don't deal with .net.

"Tony Tanzillo" wrote in message
news:5895761@discussion.autodesk.com...
You're using VB.NET with the ActiveX API.

You will get more help in the VBA newsgroup.

--
http://www.caddzone.com

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

wrote in message news:5895723@discussion.autodesk.com...
I am trying to collect all the dimensions in my -refedit session...

My code follows...

---snip---

Dim ssetObj As AcadSelectionSet

ssetObj = objAcad.SelectionSets.Add("SS1")

ssetObj.Select(AcSelect.acSelectionSetA ll, , , "0", "DIMROTATED")

Dim S1 As AcadDimRotated

For Each S1 In ssetObj
MsgBox(S1)
Next S1

---snip---

It seems pretty simple...can anyone see what's going wrong or maybe have a
better way?

All cards and letters appreciated!


I solved my earlier REFEDIT open and closing issues by using the following
code (in case anyone can use it)...

objAcad.ActiveDocument.SendCommand("(setq EN1 (entlast)) ")

objAcad.ActiveDocument.SendCommand("(command ""-refedit"" & ""(cadr EN1)"" &
vbCr & ""ok"" & vbCr & ""a"" & vbCr & vbCr) ")

DimStyleAdjust() '<-- THIS IS THE SUB WHERE I NEED TO PUT MY DIMENSION
SELECTION SET STUFF

objAcad.ActiveDocument.SendCommand("(command ""refclose"" ""S"") ")


ROCK ON...TALK 'ATCHA LATER...keep those cards and letters coming!
Message 4 of 8
Anonymous
in reply to: pellacad

"Steve" wrote

>> i seriously doubt it since vba developers don't deal with .net.

The OP's question has nothing to do with .NET, to the extent that the code he posted can be pasted right into the VBA IDE and will run as-is.


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009
http://www.acadxtabs.com
Message 5 of 8
Anonymous
in reply to: pellacad

Oh sorry, he'll have to add the Set keyword to that code to use it in VBA.

--
http://www.caddzone.com

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

"Tony Tanzillo" wrote in message news:5895801@discussion.autodesk.com...
"Steve" wrote

>> i seriously doubt it since vba developers don't deal with .net.

The OP's question has nothing to do with .NET, to the extent that the code he posted can be pasted right into the VBA IDE and will run as-is.


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009
http://www.acadxtabs.com
Message 6 of 8
pellacad
in reply to: pellacad

I don't want or need to work in VBA...

Does anyone know how to use REFEDIT with VB.NET?

I found some stuff on REFEDIT classes, but I've no idea how to find or implement the info.

Can anyone shed any light on this?
Message 7 of 8
jbooth
in reply to: pellacad

The REFEDIT command is used to modify external references (ie: XREFS).
Message 8 of 8
pellacad
in reply to: pellacad

Message to Jason Booth...did you ever live in Iowa??

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