AutoCAD Architecture Customization
Welcome to Autodesk’s AutoCAD Architecture Customization Forums. Share your knowledge, ask questions, and explore popular AutoCAD Architecture Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create Endcaps w/VBA

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
298 Views, 3 Replies

Create Endcaps w/VBA

I want to create an endcap from a pline point list. With the code below I
am able to add the endcap name to the endcap styles collection (at least I
think that's what I'm doing), but I don't know how to actually assign a
point list to the endcap style "MyEndcap".

'ADT 3.3
Dim doc As AecArchBaseDocument
Set doc = AecArchBaseApplication.ActiveDocument
doc.EndCapStyles.Add ("MyEndcap")

How is this done? Thanks


Chris
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

Chris,

You are adding the endcap style to the collection, but right now that's all
that you can do. We don't have the ability to add polyline to the style.
This is an example of an object that got some basic default behavior, but
hasn't be extended beyond that.

Sorry,

Peter Funk
API Product Manager
Building Industry Division
Autodesk, Inc.

"Chris Picklesimer" wrote in message
news:DD1D2ADFE729BD92B9725E2971AB45AA@in.WebX.maYIadrTaRb...
> I want to create an endcap from a pline point list. With the code below I
> am able to add the endcap name to the endcap styles collection (at least I
> think that's what I'm doing), but I don't know how to actually assign a
> point list to the endcap style "MyEndcap".
>
> 'ADT 3.3
> Dim doc As AecArchBaseDocument
> Set doc = AecArchBaseApplication.ActiveDocument
> doc.EndCapStyles.Add ("MyEndcap")
>
> How is this done? Thanks
>
>
> Chris
>
>
Message 3 of 4
Anonymous
in reply to: Anonymous

So we have to use 'SendCommand' .

Set acadLWPline = ThisDrawing.ModelSpace.AddLightWeightPolyline(dblP1)
strHDL = acadLWPline.Handle
strCmd = "-AecWallEndCapStyle" & vbCr
strCmd = strCmd & "D" & vbCr
strCmd = strCmd & TextWstyle.Text & vbCr
strCmd = strCmd & "(handent " & Chr(34) & strHDL & Chr(34) & ")" & vbCr
strCmd = strCmd & "1" & vbCr
strCmd = strCmd & "N" & vbCr
strCmd = strCmd & Format(-dblFW + dblFB) & vbCr
ThisDrawing.SendCommand strCmd & vbCr ' add endcap style
acadLWPline.Delete ' delete polyline



"Peter Funk - Autodesk, Inc" wrote:
> Chris,
>
> You are adding the endcap style to the collection, but right now that's all
> that you can do. We don't have the ability to add polyline to the style.
> This is an example of an object that got some basic default behavior, but
> hasn't be extended beyond that.
>
> Sorry,
>
> Peter Funk
> API Product Manager
> Building Industry Division
> Autodesk, Inc.
>
> "Chris Picklesimer" wrote in message
> news:DD1D2ADFE729BD92B9725E2971AB45AA@in.WebX.maYIadrTaRb...
> > I want to create an endcap from a pline point list. With the code below I
> > am able to add the endcap name to the endcap styles collection (at least I
> > think that's what I'm doing), but I don't know how to actually assign a
> > point list to the endcap style "MyEndcap".
> >
> > 'ADT 3.3
> > Dim doc As AecArchBaseDocument
> > Set doc = AecArchBaseApplication.ActiveDocument
> > doc.EndCapStyles.Add ("MyEndcap")
> >
> > How is this done? Thanks
> >
> >
> > Chris
> >
> >
>
Message 4 of 4
Anonymous
in reply to: Anonymous

Thanks.


"Yuji Suzuki" wrote in message
news:67DA7E8C1B2F47410BD7722E6E68B5B3@in.WebX.maYIadrTaRb...
> So we have to use 'SendCommand' .
>
> Set acadLWPline = ThisDrawing.ModelSpace.AddLightWeightPolyline(dblP1)
> strHDL = acadLWPline.Handle
> strCmd = "-AecWallEndCapStyle" & vbCr
> strCmd = strCmd & "D" & vbCr
> strCmd = strCmd & TextWstyle.Text & vbCr
> strCmd = strCmd & "(handent " & Chr(34) & strHDL & Chr(34) & ")" & vbCr
> strCmd = strCmd & "1" & vbCr
> strCmd = strCmd & "N" & vbCr
> strCmd = strCmd & Format(-dblFW + dblFB) & vbCr
> ThisDrawing.SendCommand strCmd & vbCr ' add endcap style
> acadLWPline.Delete ' delete polyline
>
>
>
> "Peter Funk - Autodesk, Inc" wrote:
> > Chris,
> >
> > You are adding the endcap style to the collection, but right now that's
all
> > that you can do. We don't have the ability to add polyline to the style.
> > This is an example of an object that got some basic default behavior,
but
> > hasn't be extended beyond that.
> >
> > Sorry,
> >
> > Peter Funk
> > API Product Manager
> > Building Industry Division
> > Autodesk, Inc.
> >
> > "Chris Picklesimer" wrote in message
> > news:DD1D2ADFE729BD92B9725E2971AB45AA@in.WebX.maYIadrTaRb...
> > > I want to create an endcap from a pline point list. With the code
below I
> > > am able to add the endcap name to the endcap styles collection (at
least I
> > > think that's what I'm doing), but I don't know how to actually assign
a
> > > point list to the endcap style "MyEndcap".
> > >
> > > 'ADT 3.3
> > > Dim doc As AecArchBaseDocument
> > > Set doc = AecArchBaseApplication.ActiveDocument
> > > doc.EndCapStyles.Add ("MyEndcap")
> > >
> > > How is this done? Thanks
> > >
> > >
> > > Chris
> > >
> > >
> >
>

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

Post to forums  

Autodesk Design & Make Report

”Boost